]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/themes/gtk.cpp
Add doc for wxGraphicsContext.Create(), which is a lightweight context with no target...
[wxWidgets.git] / src / univ / themes / gtk.cpp
index 2f383b594ccb08ff67ab506344c00901d33a0a79..40083c9747284dc11859d9bad6d46b0e55fd383c 100644 (file)
@@ -57,9 +57,7 @@
 #include "wx/notebook.h"
 #include "wx/spinbutt.h"
 #include "wx/artprov.h"
-#ifdef wxUSE_TOGGLEBTN
 #include "wx/tglbtn.h"
-#endif // wxUSE_TOGGLEBTN
 
 #include "wx/univ/stdrend.h"
 #include "wx/univ/inpcons.h"
@@ -2267,12 +2265,13 @@ void wxGTKRenderer::AdjustSize(wxSize *size, const wxWindow *window)
 #if wxUSE_SCROLLBAR
     if ( wxDynamicCast(window, wxScrollBar) )
     {
-        // we only set the width of vert scrollbars and height of the
-        // horizontal ones
-        if ( window->GetWindowStyle() & wxSB_HORIZONTAL )
-            size->y = m_sizeScrollbarArrow.x;
-        else
-            size->x = m_sizeScrollbarArrow.x;
+        /*
+        Don't adjust the size for a scrollbar as its DoGetBestClientSize
+        already has the correct size set. Any size changes here would get
+        added to the best size, making the scrollbar larger.
+        Also skip border width adjustments, they don't make sense for us.
+        */
+        return;
     }
     else
 #endif // wxUSE_SCROLLBAR