X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f1c09bed37be99493694ae370f861e4fd88fe912..94d0d21a15fa73ac426480d195d16ee04caf2de8:/src/gtk/renderer.cpp?ds=sidebyside diff --git a/src/gtk/renderer.cpp b/src/gtk/renderer.cpp index 3f32713a49..a8eb92b007 100644 --- a/src/gtk/renderer.cpp +++ b/src/gtk/renderer.cpp @@ -33,6 +33,8 @@ #include "wx/module.h" #endif +#include "wx/gtk/dc.h" + #include // ---------------------------------------------------------------------------- @@ -282,8 +284,8 @@ wxRendererGTK::DrawHeaderButton(wxWindow *win, GdkWindow* gdk_window = NULL; #if wxUSE_NEW_DC - wxImplDC *impl = dc.GetImpl(); - wxGTKImplDC *gtk_impl = wxDynamicCast( impl, wxGTKImplDC ); + wxDCImpl *impl = dc.GetImpl(); + wxGTKDCImpl *gtk_impl = wxDynamicCast( impl, wxGTKDCImpl ); if (gtk_impl) gdk_window = gtk_impl->GetGDKWindow(); #else @@ -329,8 +331,8 @@ wxRendererGTK::DrawTreeItemButton(wxWindow* win, GdkWindow* gdk_window = NULL; #if wxUSE_NEW_DC - wxImplDC *impl = dc.GetImpl(); - wxGTKImplDC *gtk_impl = wxDynamicCast( impl, wxGTKImplDC ); + wxDCImpl *impl = dc.GetImpl(); + wxGTKDCImpl *gtk_impl = wxDynamicCast( impl, wxGTKDCImpl ); if (gtk_impl) gdk_window = gtk_impl->GetGDKWindow(); #else @@ -416,8 +418,8 @@ wxRendererGTK::DrawSplitterSash(wxWindow *win, GdkWindow* gdk_window = NULL; #if wxUSE_NEW_DC - wxImplDC *impl = dc.GetImpl(); - wxGTKImplDC *gtk_impl = wxDynamicCast( impl, wxGTKImplDC ); + wxDCImpl *impl = dc.GetImpl(); + wxGTKDCImpl *gtk_impl = wxDynamicCast( impl, wxGTKDCImpl ); if (gtk_impl) gdk_window = gtk_impl->GetGDKWindow(); #else @@ -484,8 +486,8 @@ wxRendererGTK::DrawDropArrow(wxWindow *WXUNUSED(win), // are derived from it) and use its m_window. GdkWindow* gdk_window = NULL; #if wxUSE_NEW_DC - wxImplDC *impl = dc.GetImpl(); - wxGTKImplDC *gtk_impl = wxDynamicCast( impl, wxGTKImplDC ); + wxDCImpl *impl = dc.GetImpl(); + wxGTKDCImpl *gtk_impl = wxDynamicCast( impl, wxGTKDCImpl ); if (gtk_impl) gdk_window = gtk_impl->GetGDKWindow(); #else @@ -554,8 +556,8 @@ wxRendererGTK::DrawCheckBox(wxWindow *WXUNUSED(win), GdkWindow* gdk_window = NULL; #if wxUSE_NEW_DC - wxImplDC *impl = dc.GetImpl(); - wxGTKImplDC *gtk_impl = wxDynamicCast( impl, wxGTKImplDC ); + wxDCImpl *impl = dc.GetImpl(); + wxGTKDCImpl *gtk_impl = wxDynamicCast( impl, wxGTKDCImpl ); if (gtk_impl) gdk_window = gtk_impl->GetGDKWindow(); #else @@ -600,8 +602,8 @@ wxRendererGTK::DrawPushButton(wxWindow *WXUNUSED(win), GdkWindow* gdk_window = NULL; #if wxUSE_NEW_DC - wxImplDC *impl = dc.GetImpl(); - wxGTKImplDC *gtk_impl = wxDynamicCast( impl, wxGTKImplDC ); + wxDCImpl *impl = dc.GetImpl(); + wxGTKDCImpl *gtk_impl = wxDynamicCast( impl, wxGTKDCImpl ); if (gtk_impl) gdk_window = gtk_impl->GetGDKWindow(); #else @@ -643,8 +645,8 @@ wxRendererGTK::DrawItemSelectionRect(wxWindow *win, { GdkWindow* gdk_window = NULL; #if wxUSE_NEW_DC - wxImplDC *impl = dc.GetImpl(); - wxGTKImplDC *gtk_impl = wxDynamicCast( impl, wxGTKImplDC ); + wxDCImpl *impl = dc.GetImpl(); + wxGTKDCImpl *gtk_impl = wxDynamicCast( impl, wxGTKDCImpl ); if (gtk_impl) gdk_window = gtk_impl->GetGDKWindow(); #else @@ -688,7 +690,12 @@ wxRendererGTK::DrawItemSelectionRect(wxWindow *win, state, NULL, win->m_wxwindow, - "treeview", + // Detail "treeview" causes warning with GTK+ 2.12 Clearlooks theme: + // "... no property named `row-ending-details'" + // Using "treeview-middle" would fix the warning, but the right + // edge of the focus rect is not getting erased properly either. + // Better to not specify this detail unless the drawing is fixed. + NULL, dc.LogicalToDeviceX(rect.x), dc.LogicalToDeviceY(rect.y), rect.width, @@ -700,8 +707,8 @@ void wxRendererGTK::DrawFocusRect(wxWindow* win, wxDC& dc, const wxRect& rect, i { GdkWindow* gdk_window = NULL; #if wxUSE_NEW_DC - wxImplDC *impl = dc.GetImpl(); - wxGTKImplDC *gtk_impl = wxDynamicCast( impl, wxGTKImplDC ); + wxDCImpl *impl = dc.GetImpl(); + wxGTKDCImpl *gtk_impl = wxDynamicCast( impl, wxGTKDCImpl ); if (gtk_impl) gdk_window = gtk_impl->GetGDKWindow(); #else