From 16040b2f30b266c4b1e6833b1563e58096745fed Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Wed, 18 Apr 2012 22:38:40 +0200 Subject: [PATCH] Draw border for palette all the time SL #3383 gtk_render_frame_gap [1] does expect an initial and an end coordinate for the gap. paint_box_gap [2] which we used before expected a starting position of the gap and the width of the gap as parameter. The patch does calculate the end coordinate parameter for the gap from the initial coordinate and the width of the gap. Signed-off-by: Simon Schampijer Acked-by: Daniel Drake [1] http://developer.gnome.org/gtk3/3.0/GtkStyleContext.html#gtk-render-frame-gap [2] http://developer.gnome.org/gtk/2.24/GtkStyle.html#gtk-paint-box-gap --- src/sugar3/graphics/palettewindow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sugar3/graphics/palettewindow.py b/src/sugar3/graphics/palettewindow.py index 7785d106..47236efe 100644 --- a/src/sugar3/graphics/palettewindow.py +++ b/src/sugar3/graphics/palettewindow.py @@ -329,7 +329,7 @@ class _PaletteWindowWidget(Gtk.Window): context.add_class('toolitem') if gap: Gtk.render_frame_gap(context, cr, 0, 0, allocation.width, allocation.height, - gap[0], gap[1], gap[2]) + gap[0], gap[1], gap[1] + gap[2]) else: Gtk.render_frame(context, cr, 0, 0, allocation.width, allocation.height) return False @@ -1023,7 +1023,7 @@ class WidgetInvoker(Invoker): Gtk.render_frame_gap(context, cr, 0, 0, allocation.width, allocation.height, - gap[0], gap[1], gap[2]) + gap[0], gap[1], gap[1] + gap[2]) def __enter_notify_event_cb(self, widget, event): self.notify_mouse_enter()