X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..d2c2afc91be4bdb6e036516785f334ddb54afa0c:/src/generic/sashwin.cpp diff --git a/src/generic/sashwin.cpp b/src/generic/sashwin.cpp index 1a7fdee5dc..f026ed1b74 100644 --- a/src/generic/sashwin.cpp +++ b/src/generic/sashwin.cpp @@ -488,11 +488,7 @@ void wxSashWindow::DrawSash(wxSashEdgePosition edge, wxDC& dc) if ( edge == wxSASH_LEFT || edge == wxSASH_RIGHT ) { - int sashPosition = 0; - if (edge == wxSASH_LEFT) - sashPosition = 0; - else - sashPosition = w - GetEdgeMargin(edge); + int sashPosition = (edge == wxSASH_LEFT) ? 0 : ( w - GetEdgeMargin(edge) ); dc.SetPen(facePen); dc.SetBrush(faceBrush); @@ -518,11 +514,7 @@ void wxSashWindow::DrawSash(wxSashEdgePosition edge, wxDC& dc) } else // top or bottom { - int sashPosition = 0; - if (edge == wxSASH_TOP) - sashPosition = 0; - else - sashPosition = h - GetEdgeMargin(edge); + int sashPosition = (edge == wxSASH_TOP) ? 0 : ( h - GetEdgeMargin(edge) ); dc.SetPen(facePen); dc.SetBrush(faceBrush); @@ -685,11 +677,11 @@ void wxSashWindow::InitColours() m_lightShadowColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT); m_hilightColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DHILIGHT); #else - m_faceColour = *(wxTheColourDatabase->FindColour("LIGHT GREY")); - m_mediumShadowColour = *(wxTheColourDatabase->FindColour("GREY")); - m_darkShadowColour = *(wxTheColourDatabase->FindColour("BLACK")); - m_lightShadowColour = *(wxTheColourDatabase->FindColour("LIGHT GREY")); - m_hilightColour = *(wxTheColourDatabase->FindColour("WHITE")); + m_faceColour = wxTheColourDatabase->Find("LIGHT GREY"); + m_mediumShadowColour = wxTheColourDatabase->Find("GREY"); + m_darkShadowColour = wxTheColourDatabase->Find("BLACK"); + m_lightShadowColour = wxTheColourDatabase->Find("LIGHT GREY"); + m_hilightColour = wxTheColourDatabase->Find("WHITE"); #endif }