diff --git a/gtk/deprecated/gtkimagemenuitem.c b/gtk/deprecated/gtkimagemenuitem.c index 99f7a6cd8b..011df76a9c 100644 --- a/gtk/deprecated/gtkimagemenuitem.c +++ b/gtk/deprecated/gtkimagemenuitem.c @@ -645,12 +645,11 @@ gtk_image_menu_item_size_allocate (GtkWidget *widget, GtkBorder padding; GtkRequisition child_requisition; GtkAllocation child_allocation; - guint horizontal_padding, toggle_spacing; + guint toggle_spacing; gint toggle_size; toggle_size = GTK_MENU_ITEM (image_menu_item)->priv->toggle_size; gtk_widget_style_get (widget, - "horizontal-padding", &horizontal_padding, "toggle-spacing", &toggle_spacing, NULL); @@ -672,10 +671,10 @@ gtk_image_menu_item_size_allocate (GtkWidget *widget, { if ((gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR) == (pack_dir == GTK_PACK_DIRECTION_LTR)) - x = offset + horizontal_padding + padding.left + + x = offset + padding.left + (toggle_size - toggle_spacing - child_requisition.width) / 2; else - x = widget_allocation.width - offset - horizontal_padding - padding.right - + x = widget_allocation.width - offset - padding.right - toggle_size + toggle_spacing + (toggle_size - toggle_spacing - child_requisition.width) / 2; @@ -685,10 +684,10 @@ gtk_image_menu_item_size_allocate (GtkWidget *widget, { if ((gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR) == (pack_dir == GTK_PACK_DIRECTION_TTB)) - y = offset + horizontal_padding + padding.top + + y = offset + padding.top + (toggle_size - toggle_spacing - child_requisition.height) / 2; else - y = widget_allocation.height - offset - horizontal_padding - padding.bottom - + y = widget_allocation.height - offset - padding.bottom - toggle_size + toggle_spacing + (toggle_size - toggle_spacing - child_requisition.height) / 2; diff --git a/gtk/gtkcheckmenuitem.c b/gtk/gtkcheckmenuitem.c index aaf830402b..b14e35c3da 100644 --- a/gtk/gtkcheckmenuitem.c +++ b/gtk/gtkcheckmenuitem.c @@ -649,7 +649,6 @@ gtk_real_check_menu_item_draw_indicator (GtkCheckMenuItem *check_menu_item, guint offset; guint toggle_size; guint toggle_spacing; - guint horizontal_padding; guint indicator_size; GtkStateFlags state; GtkBorder padding; @@ -662,7 +661,6 @@ gtk_real_check_menu_item_draw_indicator (GtkCheckMenuItem *check_menu_item, gtk_widget_style_get (widget, "toggle-spacing", &toggle_spacing, - "horizontal-padding", &horizontal_padding, "indicator-size", &indicator_size, NULL); @@ -672,13 +670,13 @@ gtk_real_check_menu_item_draw_indicator (GtkCheckMenuItem *check_menu_item, if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR) { - x = offset + horizontal_padding + + x = offset + (toggle_size - toggle_spacing - indicator_size) / 2; } else { x = allocation.width - - offset - horizontal_padding - toggle_size + toggle_spacing + + offset - toggle_size + toggle_spacing + (toggle_size - toggle_spacing - indicator_size) / 2; }