mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-03 17:21:11 +00:00
menuitem: properly respect padding when drawing the separators
Use the padding when calculating the draw coordinates of the separator. https://bugzilla.gnome.org/show_bug.cgi?id=666242
This commit is contained in:
parent
713df0c72b
commit
4d76b10ce5
@ -1765,16 +1765,16 @@ gtk_menu_item_draw (GtkWidget *widget,
|
||||
NULL);
|
||||
if (wide_separators)
|
||||
gtk_render_frame (context, cr,
|
||||
horizontal_padding + padding.left,
|
||||
(height - separator_height - padding.top) / 2,
|
||||
width - (2 * horizontal_padding) - padding.left - padding.right,
|
||||
x + horizontal_padding + padding.left,
|
||||
y + padding.top,
|
||||
w - (2 * horizontal_padding) - padding.left - padding.right,
|
||||
separator_height);
|
||||
else
|
||||
gtk_render_line (context, cr,
|
||||
horizontal_padding + padding.left,
|
||||
(height - padding.top) / 2,
|
||||
width - horizontal_padding - padding.right - 1,
|
||||
(height - padding.top) / 2);
|
||||
x + horizontal_padding + padding.left,
|
||||
y + padding.top,
|
||||
x + w - horizontal_padding - padding.right - 1,
|
||||
y + padding.top);
|
||||
}
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_menu_item_parent_class)->draw (widget, cr);
|
||||
|
Loading…
Reference in New Issue
Block a user