X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1fe91d709854883a7e38f9b6aad709b98cebe030..3cfde7c049bddf6fd3b4c2e35a6b8ecdcdc1d74f:/src/gtk/window.cpp diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 34c8e8bce0..d6cbbfdc19 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -257,11 +257,11 @@ gdk_window_warp_pointer (GdkWindow *window, // "size_request" of m_widget //----------------------------------------------------------------------------- -// make it extern because wxStaticText needs to disconnect this one extern "C" { -void wxgtk_window_size_request_callback(GtkWidget * WXUNUSED(widget), - GtkRequisition *requisition, - wxWindow * win) +static void +wxgtk_window_size_request_callback(GtkWidget * WXUNUSED(widget), + GtkRequisition *requisition, + wxWindow * win) { int w, h; win->GetSize( &w, &h ); @@ -2095,6 +2095,7 @@ bool wxWindowGTK::Create( wxWindow *parent, { // Get default border wxBorder border = GetBorder(style); + style &= ~wxBORDER_MASK; style |= border; @@ -2105,6 +2106,12 @@ bool wxWindowGTK::Create( wxWindow *parent, 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); #ifndef __WXUNIVERSAL__ @@ -2122,9 +2129,6 @@ bool wxWindowGTK::Create( wxWindow *parent, GtkScrolledWindow *scrolledWindow = GTK_SCROLLED_WINDOW(m_widget); - GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT_GET_CLASS(m_widget) ); - scroll_class->scrollbar_spacing = 0; - // There is a conflict with default bindings at GTK+ // level between scrolled windows and notebooks both of which want to use // Ctrl-PageUp/Down: scrolled windows for scrolling in the horizontal @@ -2677,12 +2681,15 @@ void wxWindowGTK::DoGetClientSize( int *width, int *height ) const continue; } + GtkScrolledWindowClass *scroll_class = + GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT_GET_CLASS(m_widget) ); + GtkRequisition req; gtk_widget_size_request(GTK_WIDGET(range), &req); if (i == ScrollDir_Horz) - h -= req.height; + h -= req.height + scroll_class->scrollbar_spacing; else - w -= req.width; + w -= req.width + scroll_class->scrollbar_spacing; } }