From: Paul Cornett Date: Thu, 19 Jul 2012 15:39:48 +0000 (+0000) Subject: improve appearance of themed borders X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2c48aec501464ea2fb314eb7368291d5917c35ec improve appearance of themed borders git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 71f22ac879..72fb7c05be 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -314,21 +314,25 @@ draw_border(GtkWidget* widget, GdkEventExpose* gdk_event, wxWindow* win) if (win->HasFlag(wxBORDER_RAISED)) shadow = GTK_SHADOW_OUT; - // Style detail to use + GtkStyle* style; const char* detail; - if (win->m_widget == win->m_wxwindow) - // for non-scrollable wxWindows - detail = "entry"; - else - // for scrollable ones + if (win->HasFlag(wxHSCROLL | wxVSCROLL)) + { + style = gtk_widget_get_style(wxGTKPrivate::GetTreeWidget()); detail = "viewport"; + } + else + { + style = gtk_widget_get_style(wxGTKPrivate::GetEntryWidget()); + detail = "entry"; + } // clip rect is required to avoid painting background // over upper left (w,h) of parent window GdkRectangle clipRect = { x, y, w, h }; gtk_paint_shadow( - gtk_widget_get_style(win->m_wxwindow), gdk_event->window, GTK_STATE_NORMAL, - shadow, &clipRect, wxGTKPrivate::GetEntryWidget(), detail, x, y, w, h); + style, gdk_event->window, GTK_STATE_NORMAL, + shadow, &clipRect, widget, detail, x, y, w, h); #endif // !__WXGTK3__ } return false;