From 12fdbd3d6a638ac5110b1686deee619c56b71994 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Wed, 14 Nov 2012 18:19:25 +0000 Subject: [PATCH] Fix GetClientSize() when scrollbars are present 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 0543ea5..17e397a 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -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++ ) { -- 2.7.4