From ade171a2ed1f868b13dd1f1cb221e6622b92e052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 16 Aug 2018 06:53:03 +0200 Subject: widget: Don't pass a position to ->size_allocate The values have been 0/0 for a long time now, so just drop the GtkAllocation argument and replace it with width and height. --- gtk/gtkcheckmenuitem.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'gtk/gtkcheckmenuitem.c') diff --git a/gtk/gtkcheckmenuitem.c b/gtk/gtkcheckmenuitem.c index 3d9c8954d3..8e75d6e884 100644 --- a/gtk/gtkcheckmenuitem.c +++ b/gtk/gtkcheckmenuitem.c @@ -104,9 +104,10 @@ G_DEFINE_TYPE_WITH_CODE (GtkCheckMenuItem, gtk_check_menu_item, GTK_TYPE_MENU_IT G_ADD_PRIVATE (GtkCheckMenuItem)) static void -gtk_check_menu_item_size_allocate (GtkWidget *widget, - const GtkAllocation *allocation, - int baseline) +gtk_check_menu_item_size_allocate (GtkWidget *widget, + int width, + int height, + int baseline) { GtkAllocation indicator_alloc; GtkCheckMenuItem *check_menu_item = GTK_CHECK_MENU_ITEM (widget); @@ -114,7 +115,8 @@ gtk_check_menu_item_size_allocate (GtkWidget *widget, gint toggle_size; GTK_WIDGET_CLASS (gtk_check_menu_item_parent_class)->size_allocate (widget, - allocation, + width, + height, baseline); gtk_widget_measure (priv->indicator_widget, @@ -132,10 +134,10 @@ gtk_check_menu_item_size_allocate (GtkWidget *widget, if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR) indicator_alloc.x = (toggle_size - indicator_alloc.width) / 2; else - indicator_alloc.x = allocation->width - toggle_size + + indicator_alloc.x = width - toggle_size + (toggle_size - indicator_alloc.width) / 2; - indicator_alloc.y = (allocation->height - indicator_alloc.height) / 2; + indicator_alloc.y = (height - indicator_alloc.height) / 2; gtk_widget_size_allocate (priv->indicator_widget, &indicator_alloc, -- cgit v1.2.1