X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/899544330f37440c140b72a014c518a911b5b7a4..bcf324bebe65cd7ee49c139533ceea52dceb4b91:/src/gtk1/renderer.cpp diff --git a/src/gtk1/renderer.cpp b/src/gtk1/renderer.cpp index 27ec163a20..96ceee484a 100644 --- a/src/gtk1/renderer.cpp +++ b/src/gtk1/renderer.cpp @@ -29,11 +29,11 @@ #ifndef WX_PRECOMP #include "wx/window.h" #include "wx/dc.h" - #include "wx/dcclient.h" #endif #include #include "wx/gtk1/win_gtk.h" +#include "wx/gtk1/dcclient.h" // RR: After a correction to the orientation of the sash // this doesn't seem to be required anymore and it @@ -141,7 +141,7 @@ wxRendererGTK::DrawHeaderButton(wxWindow *win, NULL, button, "button", - dc.XLOG2DEV(rect.x) -1, rect.y -1, rect.width +2, rect.height +2 + dc.LogicalToDeviceX(rect.x) -1, rect.y -1, rect.width +2, rect.height +2 ); } @@ -287,7 +287,7 @@ wxRendererGTK::DrawSplitterSash(wxWindow *win, GTK_PIZZA(win->m_wxwindow)->bin_window, GTK_STATE_NORMAL, GTK_SHADOW_OUT, - (GdkRectangle*) NULL, + NULL, win->m_wxwindow, (char *)"paned", // const_cast isVert ? position : size.x - 2*SASH_SIZE, @@ -309,9 +309,10 @@ wxRendererGTK::DrawDropArrow(wxWindow *WXUNUSED(win), // work for wxMemoryDC. So that is why we assume wxDC // is wxWindowDC (wxClientDC, wxMemoryDC and wxPaintDC // are derived from it) and use its m_window. - GdkWindow* gdk_window = dc.GetGDKWindow(); - wxASSERT_MSG( gdk_window, - wxT("cannot use wxRendererNative on wxDC of this type") ); + wxWindowDCImpl * const impl = wxDynamicCast(dc.GetImpl(), wxWindowDCImpl); + wxCHECK_RET( impl, "must have a window DC" ); + + GdkWindow* gdk_window = impl->GetGDKWindow(); // draw arrow so that there is even space horizontally // on both sides @@ -362,9 +363,10 @@ wxRendererGTK::DrawComboBoxDropButton(wxWindow *win, GtkWidget *button = GetButtonWidget(); // for reason why we do this, see DrawDropArrow - GdkWindow* gdk_window = dc.GetGDKWindow(); - wxASSERT_MSG( gdk_window, - wxT("cannot use wxRendererNative on wxDC of this type") ); + wxWindowDCImpl * const impl = wxDynamicCast(dc.GetImpl(), wxWindowDCImpl); + wxCHECK_RET( impl, "must have a window DC" ); + + GdkWindow* gdk_window = impl->GetGDKWindow(); // draw button GtkStateType state;