]> git.saurik.com Git - wxWidgets.git/commitdiff
improve appearance of themed borders
authorPaul Cornett <paulcor@bullseye.com>
Thu, 19 Jul 2012 15:39:48 +0000 (15:39 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Thu, 19 Jul 2012 15:39:48 +0000 (15:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/window.cpp

index 71f22ac87967ecd059e4c8096bbda395850b3f7f..72fb7c05beede54acb4040ae7ea8f611fca6ab7d 100644 (file)
@@ -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;