Remove scrollbar spacing from client size

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2009-01-23 12:39:56 +00:00
parent 37e8bdb87d
commit 7da4a9cfea

View File

@@ -2095,6 +2095,7 @@ bool wxWindowGTK::Create( wxWindow *parent,
{ {
// Get default border // Get default border
wxBorder border = GetBorder(style); wxBorder border = GetBorder(style);
style &= ~wxBORDER_MASK; style &= ~wxBORDER_MASK;
style |= border; style |= border;
@@ -2105,6 +2106,12 @@ bool wxWindowGTK::Create( wxWindow *parent,
return false; return false;
} }
// We should accept the native look
#if 0
GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT_GET_CLASS(m_widget) );
scroll_class->scrollbar_spacing = 0;
#endif
m_wxwindow = wxPizza::New(m_windowStyle); m_wxwindow = wxPizza::New(m_windowStyle);
#ifndef __WXUNIVERSAL__ #ifndef __WXUNIVERSAL__
@@ -2122,12 +2129,6 @@ bool wxWindowGTK::Create( wxWindow *parent,
GtkScrolledWindow *scrolledWindow = GTK_SCROLLED_WINDOW(m_widget); GtkScrolledWindow *scrolledWindow = GTK_SCROLLED_WINDOW(m_widget);
// We should accept the native look
#if 0
GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT_GET_CLASS(m_widget) );
scroll_class->scrollbar_spacing = 0;
#endif
// There is a conflict with default bindings at GTK+ // There is a conflict with default bindings at GTK+
// level between scrolled windows and notebooks both of which want to use // level between scrolled windows and notebooks both of which want to use
// Ctrl-PageUp/Down: scrolled windows for scrolling in the horizontal // Ctrl-PageUp/Down: scrolled windows for scrolling in the horizontal
@@ -2680,12 +2681,15 @@ void wxWindowGTK::DoGetClientSize( int *width, int *height ) const
continue; continue;
} }
GtkScrolledWindowClass *scroll_class =
GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT_GET_CLASS(m_widget) );
GtkRequisition req; GtkRequisition req;
gtk_widget_size_request(GTK_WIDGET(range), &req); gtk_widget_size_request(GTK_WIDGET(range), &req);
if (i == ScrollDir_Horz) if (i == ScrollDir_Horz)
h -= req.height; h -= req.height + scroll_class->scrollbar_spacing;
else else
w -= req.width; w -= req.width + scroll_class->scrollbar_spacing;
} }
} }