X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..a72f1d162b1f511d3e9fa54304be695f07c79832:/src/generic/sashwin.cpp?ds=sidebyside diff --git a/src/generic/sashwin.cpp b/src/generic/sashwin.cpp index 1a7fdee5dc..b713f12752 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); @@ -678,19 +670,11 @@ void wxSashWindow::SizeWindows() void wxSashWindow::InitColours() { // Shadow colours -#ifndef __WIN16__ m_faceColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); m_mediumShadowColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW); m_darkShadowColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DDKSHADOW); 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")); -#endif } void wxSashWindow::SetSashVisible(wxSashEdgePosition edge, bool sash)