[gtk+] menuitem: properly respect padding when drawing the separators
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] menuitem: properly respect padding when drawing the separators
- Date: Thu, 15 Dec 2011 17:54:43 +0000 (UTC)
commit 4d76b10ce5ff782fedc3e77e4a43a91415f00562
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Dec 15 16:00:32 2011 +0100
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
gtk/gtkmenuitem.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index e9c2bea..9c9dea3 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]