diff options
author | Timm Bäder <mail@baedert.org> | 2018-08-16 06:53:03 +0200 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2018-11-13 16:28:54 +0100 |
commit | ade171a2ed1f868b13dd1f1cb221e6622b92e052 (patch) | |
tree | 19d911660e38043ee30b51e29548f7c9b72acdcc /gtk/gtkcheckmenuitem.c | |
parent | 1f1306a53b7c496ba0694544bde71265110fe4ed (diff) | |
download | gtk+-ade171a2ed1f868b13dd1f1cb221e6622b92e052.tar.gz |
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.
Diffstat (limited to 'gtk/gtkcheckmenuitem.c')
-rw-r--r-- | gtk/gtkcheckmenuitem.c | 14 |
1 files changed, 8 insertions, 6 deletions
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, |