]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix GetClientSize() when scrollbars are present
authorPaul Cornett <paulcor@bullseye.com>
Wed, 14 Nov 2012 18:19:25 +0000 (18:19 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Wed, 14 Nov 2012 18:19:25 +0000 (18:19 +0000)
The value of GtkScrolledWindowClass.scrollbar_spacing seems to be invalid (-1).
Use the style property "scrollbar-spacing" instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/window.cpp

index 0543ea56e73c07b8c5a44686678d598bcb19a179..17e397ae4c86fbecb623bc26b4a081c6a9c6ed99 100644 (file)
@@ -2806,8 +2806,8 @@ void wxWindowGTK::DoGetClientSize( int *width, int *height ) const
             gtk_scrolled_window_get_policy(GTK_SCROLLED_WINDOW(m_widget),
                                            &policy[ScrollDir_Horz],
                                            &policy[ScrollDir_Vert]);
-            const int scrollbar_spacing =
-                GTK_SCROLLED_WINDOW_GET_CLASS(m_widget)->scrollbar_spacing;
+            int scrollbar_spacing;
+            gtk_widget_style_get(m_widget, "scrollbar-spacing", &scrollbar_spacing, NULL);
 
             for ( int i = 0; i < ScrollDir_Max; i++ )
             {