From: Matthias Clasen Date: Mon, 22 May 2023 20:14:17 +0000 (-0400) Subject: menus: Avoid unnecessary right padding X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~225^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a9adf7163f322378787ea63db999b2306e2aeed7;p=gtk4.git menus: Avoid unnecessary right padding We are using placeholders in the 'check' column that are put in a size group, so that they all take the same space once a check or radio is shown. Unfortunately, for the inline-buttons option, we were using a GtkBuiltinIcon as placeholder, and those respect the -gtk-icon-size CSS property and take a minimum size of 16px. Use a GtkGizmo instead to get the expected result of no extra padding unless there's a check or radio. Fixes: #5839 --- diff --git a/gtk/gtkmenusectionbox.c b/gtk/gtkmenusectionbox.c index 038724a741..739c890563 100644 --- a/gtk/gtkmenusectionbox.c +++ b/gtk/gtkmenusectionbox.c @@ -664,7 +664,7 @@ gtk_menu_section_box_new_section (GtkMenuTrackerItem *item, gtk_orientable_set_orientation (GTK_ORIENTABLE (box->item_box), GTK_ORIENTATION_HORIZONTAL); gtk_widget_add_css_class (GTK_WIDGET (box->item_box), "inline-buttons"); - spacer = gtk_builtin_icon_new ("none"); + spacer = gtk_gizmo_new ("none", NULL, NULL, NULL,NULL, NULL, NULL); gtk_box_append (GTK_BOX (box->item_box), spacer); gtk_size_group_add_widget (box->indicators, spacer);