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 <simon@laptop.org> Acked-by: Daniel Drake <dsd@laptop.org> [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
This commit is contained in:
parent
877ec3847c
commit
16040b2f30
@ -329,7 +329,7 @@ class _PaletteWindowWidget(Gtk.Window):
|
|||||||
context.add_class('toolitem')
|
context.add_class('toolitem')
|
||||||
if gap:
|
if gap:
|
||||||
Gtk.render_frame_gap(context, cr, 0, 0, allocation.width, allocation.height,
|
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:
|
else:
|
||||||
Gtk.render_frame(context, cr, 0, 0, allocation.width, allocation.height)
|
Gtk.render_frame(context, cr, 0, 0, allocation.width, allocation.height)
|
||||||
return False
|
return False
|
||||||
@ -1023,7 +1023,7 @@ class WidgetInvoker(Invoker):
|
|||||||
Gtk.render_frame_gap(context, cr, 0, 0,
|
Gtk.render_frame_gap(context, cr, 0, 0,
|
||||||
allocation.width,
|
allocation.width,
|
||||||
allocation.height,
|
allocation.height,
|
||||||
gap[0], gap[1], gap[2])
|
gap[0], gap[1], gap[1] + gap[2])
|
||||||
|
|
||||||
def __enter_notify_event_cb(self, widget, event):
|
def __enter_notify_event_cb(self, widget, event):
|
||||||
self.notify_mouse_enter()
|
self.notify_mouse_enter()
|
||||||
|
Loading…
Reference in New Issue
Block a user