]> git.saurik.com Git - wxWidgets.git/commitdiff
use correct background color when drawing borders
authorPaul Cornett <paulcor@bullseye.com>
Fri, 10 Oct 2008 15:51:09 +0000 (15:51 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Fri, 10 Oct 2008 15:51:09 +0000 (15:51 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/window.cpp

index 08583058e34b26288dfb90d84de4248712a5565f..6b59396545854b472938a2d081802b7ec654364e 100644 (file)
@@ -321,10 +321,8 @@ expose_event_border(GtkWidget* widget, GdkEventExpose* gdk_event, wxWindow* win)
     int h = win->m_wxwindow->allocation.height;
     if (win->HasFlag(wxBORDER_SIMPLE))
     {
-        GdkGC* gc = gdk_gc_new(gdk_event->window);
-        gdk_gc_set_foreground(gc, &widget->style->black);
-        gdk_draw_rectangle(gdk_event->window, gc, false, x, y, w - 1, h - 1);
-        g_object_unref(gc);
+        gdk_draw_rectangle(gdk_event->window,
+            widget->style->black_gc, false, x, y, w - 1, h - 1);
     }
     else
     {
@@ -341,10 +339,9 @@ expose_event_border(GtkWidget* widget, GdkEventExpose* gdk_event, wxWindow* win)
             // for scrollable ones
             detail = "viewport";
 
-        GtkWidget* styleWidget = wxGTKPrivate::GetEntryWidget();
         gtk_paint_shadow(
-           styleWidget->style, gdk_event->window, GTK_STATE_NORMAL,
-           shadow, NULL, styleWidget, detail, x, y, w, h);
+           win->m_wxwindow->style, gdk_event->window, GTK_STATE_NORMAL,
+           shadow, NULL, wxGTKPrivate::GetEntryWidget(), detail, x, y, w, h);
     }
 
     // no further painting is needed for border-only GdkWindow