]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/stdrend.cpp
[ 1560860 ] wxComboCtrl EVT_TEXT filtering.
[wxWidgets.git] / src / univ / stdrend.cpp
index 37f95f7aa7ff4fe7db9cac187f545a4af6a1b713..d29a4dc89b0e9cebf72a63bc9c793fa2649433e2 100644 (file)
 #endif
 
 #ifndef WX_PRECOMP
+    #include "wx/settings.h"
+    #include "wx/brush.h"
+    #include "wx/dc.h"
+    #include "wx/statusbr.h"
+    #include "wx/toplevel.h"
 #endif //WX_PRECOMP
 
 #include "wx/univ/stdrend.h"
@@ -366,12 +371,22 @@ void wxStdRenderer::DrawAntiSunkenBorder(wxDC& dc, wxRect *rect)
     DrawShadedRect(dc, rect, m_penHighlight, m_penDarkGrey);
 }
 
-void wxStdRenderer::DrawFrameBorder(wxDC& dc, wxRect *rect)
+void wxStdRenderer::DrawBoxBorder(wxDC& dc, wxRect *rect)
 {
     DrawShadedRect(dc, rect, m_penDarkGrey, m_penHighlight);
     DrawShadedRect(dc, rect, m_penHighlight, m_penDarkGrey);
 }
 
+void wxStdRenderer::DrawStaticBorder(wxDC& dc, wxRect *rect)
+{
+    DrawShadedRect(dc, rect, m_penDarkGrey, m_penHighlight);
+}
+
+void wxStdRenderer::DrawExtraBorder(wxDC& dc, wxRect *rect)
+{
+    DrawRect(dc, rect, m_penLightGrey);
+}
+
 void wxStdRenderer::DrawBorder(wxDC& dc,
                                wxBorder border,
                                const wxRect& rectTotal,
@@ -388,11 +403,11 @@ void wxStdRenderer::DrawBorder(wxDC& dc,
 
         case wxBORDER_DOUBLE:
             DrawAntiSunkenBorder(dc, &rect);
-            DrawRect(dc, &rect, m_penLightGrey);
+            DrawExtraBorder(dc, &rect);
             break;
 
         case wxBORDER_STATIC:
-            DrawShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight);
+            DrawStaticBorder(dc, &rect);
             break;
 
         case wxBORDER_RAISED:
@@ -574,7 +589,7 @@ void wxStdRenderer::DrawFrame(wxDC& dc,
     }
     else // no label
     {
-        DrawFrameBorder(dc, &rectFrame);
+        DrawBoxBorder(dc, &rectFrame);
     }
 }
 
@@ -1256,11 +1271,10 @@ void wxStdRenderer::DrawFrameBorder(wxDC& dc, const wxRect& rect, int flags)
 
     wxRect r(rect);
 
-    DrawShadedRect(dc, &r, m_penLightGrey, m_penBlack);
-    DrawShadedRect(dc, &r, m_penHighlight, m_penDarkGrey);
-    DrawShadedRect(dc, &r, m_penLightGrey, m_penLightGrey);
+    DrawAntiSunkenBorder(dc, &r);
+    DrawExtraBorder(dc, &r);
     if ( flags & wxTOPLEVEL_RESIZEABLE )
-        DrawShadedRect(dc, &r, m_penLightGrey, m_penLightGrey);
+        DrawExtraBorder(dc, &r);
 }
 
 void wxStdRenderer::DrawFrameBackground(wxDC& dc, const wxRect& rect, int flags)
@@ -1388,8 +1402,7 @@ void wxStdRenderer::DrawFrameButton(wxDC& dc,
     {
         DrawSunkenBorder(dc, &rectBtn);
 
-        rectBtn.x++;
-        rectBtn.y++;
+        rectBtn.Offset(1, 1);
     }
     else
     {
@@ -1482,4 +1495,3 @@ wxSize wxStdRenderer::GetFrameIconSize() const
 {
     return wxSize(16, 16);
 }
-