]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/sashwin.cpp
Applied patch [ 818941 ] Initialize vars and clear wxImageList
[wxWidgets.git] / src / generic / sashwin.cpp
index 1a7fdee5dcd2c2cc093e0a58591520c8ee84e02d..f026ed1b74840cad7508f69c155a841b11ee38ee 100644 (file)
@@ -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
 }