]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/themes/win32.cpp
Applied patch [ 587450 ] Scoped Smart pointers and docs
[wxWidgets.git] / src / univ / themes / win32.cpp
index dae32a197b7695eb6841a8cc58fb0803ee1ee2b0..ccf87bc3ff467184d2f05af90bad77e2a56b1dfd 100644 (file)
@@ -148,7 +148,8 @@ public:
     virtual void DrawBackground(wxDC& dc,
                                 const wxColour& col,
                                 const wxRect& rect,
     virtual void DrawBackground(wxDC& dc,
                                 const wxColour& col,
                                 const wxRect& rect,
-                                int flags = 0);
+                                int flags = 0,
+                                wxWindow *window = NULL);
     virtual void DrawLabel(wxDC& dc,
                            const wxString& label,
                            const wxRect& rect,
     virtual void DrawLabel(wxDC& dc,
                            const wxString& label,
                            const wxRect& rect,
@@ -354,7 +355,7 @@ public:
     virtual wxSize GetToolBarButtonSize(wxCoord *separator) const
         { if ( separator ) *separator = 5; return wxSize(16, 15); }
     virtual wxSize GetToolBarMargin() const
     virtual wxSize GetToolBarButtonSize(wxCoord *separator) const
         { if ( separator ) *separator = 5; return wxSize(16, 15); }
     virtual wxSize GetToolBarMargin() const
-        { return wxSize(6, 6); }
+        { return wxSize(4, 4); }
 
     virtual wxRect GetTextTotalArea(const wxTextCtrl *text,
                                     const wxRect& rect) const;
 
     virtual wxRect GetTextTotalArea(const wxTextCtrl *text,
                                     const wxRect& rect) const;
@@ -404,7 +405,8 @@ protected:
     // DrawButtonBorder() helper
     void DoDrawBackground(wxDC& dc,
                           const wxColour& col,
     // DrawButtonBorder() helper
     void DoDrawBackground(wxDC& dc,
                           const wxColour& col,
-                          const wxRect& rect);
+                          const wxRect& rect,
+                          wxWindow *window = NULL );
 
     // DrawBorder() helpers: all of them shift and clip the DC after drawing
     // the border
 
     // DrawBorder() helpers: all of them shift and clip the DC after drawing
     // the border
@@ -1174,6 +1176,7 @@ wxWin32Theme::wxWin32Theme()
     m_scheme = NULL;
     m_renderer = NULL;
     m_handlerDefault = NULL;
     m_scheme = NULL;
     m_renderer = NULL;
     m_handlerDefault = NULL;
+    m_artProvider = NULL;
 }
 
 wxWin32Theme::~wxWin32Theme()
 }
 
 wxWin32Theme::~wxWin32Theme()
@@ -1189,6 +1192,7 @@ wxWin32Theme::~wxWin32Theme()
 
     delete m_renderer;
     delete m_scheme;
 
     delete m_renderer;
     delete m_scheme;
+    wxArtProvider::RemoveProvider(m_artProvider);
 }
 
 wxRenderer *wxWin32Theme::GetRenderer()
 }
 
 wxRenderer *wxWin32Theme::GetRenderer()
@@ -3203,7 +3207,8 @@ void wxWin32Renderer::GetComboBitmaps(wxBitmap *bmpNormal,
 
 void wxWin32Renderer::DoDrawBackground(wxDC& dc,
                                        const wxColour& col,
 
 void wxWin32Renderer::DoDrawBackground(wxDC& dc,
                                        const wxColour& col,
-                                       const wxRect& rect)
+                                       const wxRect& rect,
+                                       wxWindow *window )
 {
     wxBrush brush(col, wxSOLID);
     dc.SetBrush(brush);
 {
     wxBrush brush(col, wxSOLID);
     dc.SetBrush(brush);
@@ -3214,11 +3219,12 @@ void wxWin32Renderer::DoDrawBackground(wxDC& dc,
 void wxWin32Renderer::DrawBackground(wxDC& dc,
                                      const wxColour& col,
                                      const wxRect& rect,
 void wxWin32Renderer::DrawBackground(wxDC& dc,
                                      const wxColour& col,
                                      const wxRect& rect,
-                                     int flags)
+                                     int flags,
+                                     wxWindow *window )
 {
     // just fill it with the given or default bg colour
     wxColour colBg = col.Ok() ? col : wxSCHEME_COLOUR(m_scheme, CONTROL);
 {
     // just fill it with the given or default bg colour
     wxColour colBg = col.Ok() ? col : wxSCHEME_COLOUR(m_scheme, CONTROL);
-    DoDrawBackground(dc, colBg, rect);
+    DoDrawBackground(dc, colBg, rect, window );
 }
 
 // ----------------------------------------------------------------------------
 }
 
 // ----------------------------------------------------------------------------
@@ -4160,12 +4166,12 @@ bool wxWin32ScrollBarInputHandler::HandleMouseMove(wxInputConsumer *control,
         wxPoint pos = event.GetPosition();
         if (scrollbar->HasFlag( wxVERTICAL ))
         {
         wxPoint pos = event.GetPosition();
         if (scrollbar->HasFlag( wxVERTICAL ))
         {
-            if (pos.x > -20 && pos.x < scrollbar->GetSize().x+20)
+            if (pos.x > -40 && pos.x < scrollbar->GetSize().x+40)
                pos.x = 5;
         }
         else
         {
                pos.x = 5;
         }
         else
         {
-            if (pos.y > -20 && pos.y < scrollbar->GetSize().y+20)
+            if (pos.y > -40 && pos.y < scrollbar->GetSize().y+40)
                pos.y = 5;
         }
         ht = m_renderer->HitTestScrollbar(scrollbar, pos );
                pos.y = 5;
         }
         ht = m_renderer->HitTestScrollbar(scrollbar, pos );