summaryrefslogtreecommitdiff
path: root/gtk/gtkmenuitem.c
diff options
context:
space:
mode:
authorSoeren Sandmann <sandmann@daimi.au.dk>2002-04-04 20:28:47 +0000
committerSøren Sandmann Pedersen <ssp@src.gnome.org>2002-04-04 20:28:47 +0000
commit3c52eba0b51ced6a53db8d73287588e6fe0b73e5 (patch)
treebb8d7994590ea175a0ade207c7c361e022646bb5 /gtk/gtkmenuitem.c
parentabda40ede4b5b1a176f88b6ef59ec8623492eadf (diff)
downloadgdk-pixbuf-3c52eba0b51ced6a53db8d73287588e6fe0b73e5.tar.gz
Fix problem with menu titles being clipped (#75948)
Thu Apr 4 22:28:08 2002 Soeren Sandmann <sandmann@daimi.au.dk> * gtk/gtkmenuitem.c (gtk_menu_item_paint): Fix problem with menu titles being clipped (#75948)
Diffstat (limited to 'gtk/gtkmenuitem.c')
-rw-r--r--gtk/gtkmenuitem.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index 2735a5c14..5e30156e9 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -614,9 +614,16 @@ gtk_menu_item_paint (GtkWidget *widget,
if (menu_item->submenu && menu_item->show_submenu_indicator)
{
+ GtkRequisition child_requisition;
gint arrow_x, arrow_y;
- gint arrow_size = height - 2 * widget->style->ythickness;
- gint arrow_extent = arrow_size / 2;
+ gint arrow_size;
+ gint arrow_extent;
+
+ gtk_widget_get_child_requisition (GTK_BIN (menu_item)->child,
+ &child_requisition);
+
+ arrow_size = child_requisition.height - 2 * widget->style->ythickness;
+ arrow_extent = arrow_size * 0.6;
shadow_type = GTK_SHADOW_OUT;
if (state_type == GTK_STATE_PRELIGHT)