GNOME Bugzilla – Bug 760560
Icon buttons wider in GTK+ 3.19.6
Last modified: 2016-03-05 01:53:23 UTC
Created attachment 318930 [details] screenshot showing both old, square (in virt-manager) and new, fat (in anaconda) icon buttons I don't know if this is a bug or intentional, but it seems worth reporting. With GTK+ 3.19.6, buttons which have no text label but rather just an icon are wider than before. This is visible in several places, e.g. in virt-manager (the row of icons shown above the display of a running VM), and in anaconda (the + / - / 'refresh' buttons at the bottom of the left-hand pane in the custom partitioning screen). In previous GTK+ releases the buttons were, I think, perfectly square; they now appear weirdly fat, to eyes used to the old appearance, and of course the extra width is basically wasted, it's just empty greyness. I'm attaching a screenshot which shows virt-manager running under Fedora 22 (so using an older GTK+; you can see the buttons in virt-manager itself are square), with the VM showing the custom partitioning screen in today's Rawhide nightly installer; you can see the buttons in the installer are 'fat'.
Confirming it's not intentional, thanks for reporting.
How is this toolbar constructed ? I just added an 'inline-toolbar' example to gtk3-widget-factory, and it shows up as expected (square image buttons).
Can you check (with the gtk+ inspector) which are the style classes of the wider buttons?
Created attachment 321160 [details] button with image In gtk 3.18 this rule applied to image buttons (gtk-contained.css:918): .button.image-button, GtkScaleButton.button, GtkVolumeButton.button, .header-bar .titlebutton.button, .titlebar .titlebutton.button { padding: 8px; } In master, only the unspecific button padding (padding: 4px 8px;) applies. See glade file for test case.
Sizing is done differently now with min-height and min-width in the mix, what was done in 3.18 doesn't count much, those buttons may be wider for the wrong style classes applied or some construction I'm not considering in the theme.
If you need an example in GTK+, gtk3-demo CSS/Style Classes has an inline toolbar that is affected by this.
The gtk3-demo example looks good to me, even if the buttons in the inline-toolbar (incorrectly) sport both image-button and text-button styleclasses.
Created attachment 322898 [details] but they're not square!
Created attachment 322900 [details] how it looks in 3.18 (still not quite square, but smaller)
Right, buttons are not square there, I was looking at the wrong branch (...), this is caused by the text-button styleclass being there though.
removing the text-button style class doesn't change the size of those buttons
In the widget factory toolbar you'll havr to remove all of them to have the right size, no idea why, but it's totally not Adwaita related