X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/64407854c188761c982072f9c94c479284ee0dfe..00f553943850592fda4607bf8a34d458cf6ab522:/src/generic/sashwin.cpp diff --git a/src/generic/sashwin.cpp b/src/generic/sashwin.cpp index 5d00773b5c..f026ed1b74 100644 --- a/src/generic/sashwin.cpp +++ b/src/generic/sashwin.cpp @@ -11,7 +11,7 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "sashwin.h" #endif @@ -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 }