compute scrollbar spacing the same way GtkScrolledWindow does it

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73186 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett 2012-12-14 06:29:54 +00:00
parent ffc28384ca
commit cbe6a493b6

View File

@ -2837,8 +2837,16 @@ void wxWindowGTK::DoGetClientSize( int *width, int *height ) const
gtk_scrolled_window_get_policy(GTK_SCROLLED_WINDOW(m_widget),
&policy[ScrollDir_Horz],
&policy[ScrollDir_Vert]);
int scrollbar_spacing;
gtk_widget_style_get(m_widget, "scrollbar-spacing", &scrollbar_spacing, NULL);
// get scrollbar spacing the same way the GTK-private function
// _gtk_scrolled_window_get_scrollbar_spacing() does it
int scrollbar_spacing =
GTK_SCROLLED_WINDOW_GET_CLASS(m_widget)->scrollbar_spacing;
if (scrollbar_spacing < 0)
{
gtk_widget_style_get(
m_widget, "scrollbar-spacing", &scrollbar_spacing, NULL);
}
for ( int i = 0; i < ScrollDir_Max; i++ )
{