Created attachment 135836 [details] Menu item height comparison SUMMARY On Plasma 5.21.0, the menu items seem larger in GTK3 applications using the breeze-gtk theme compared to the menu items of Qt applications using the breeze theme. It doesn't seem to affect Firefox and Thunderbird for some reason, but it's visible on Shotwell and Handbrake for example. On GTK2 applications (tested with Gimp) the menu item height seems smaller. SOFTWARE/OS VERSIONS OS: Archlinux KDE Plasma Version: 5.21.0 KDE Frameworks Version: 5.79.0 Qt Version: 5.15.2
I can confirm the bug on openSUSE Tumbleweed and Plasma 5.21.0 It affect all gtk3 applications that I've tested: Firefox, Thunderbird, Eclipse, Libreoffice, Handbrake.
*** Bug 433687 has been marked as a duplicate of this bug. ***
Jan, can you please take a look? Thanks!
I think it's related to changes referenced on https://bugs.kde.org/show_bug.cgi?id=431819 As a temporary workaround I've added these lines on ~/.config/gtk-3.0/gtk.css menubar > menuitem, .menubar > menuitem { padding: 5px 6px; } menu menuitem, .menu menuitem { padding: 5px 4px; } modelbutton.flat, popover.background checkbutton.flat, popover.background radiobutton.flat, .menuitem.button.flat, button.button.sidebar-button, notebook > header > tabs > arrow.button, popover.background checkbutton.button, popover.background radiobutton.button { padding: 5px 8px; } With this config the gtk3 menu items are only slightly taller (1 pixel), if I use a 4px vertical padding then the menu items are slightly shorter (1 pixel).
Would you like to submit a merge request to fix it? Seems like you've already done most of the work. https://invent.kde.org/plasma/breeze-gtk/-/merge_requests/
I've done some changes to the gtk.css code: menubar > menuitem, .menubar > menuitem { padding: 4px 6px 5px 6px; } menu menuitem, .menu menuitem { padding: 4px 4px 5px 4px; } modelbutton.flat, popover.background checkbutton.flat, popover.background radiobutton.flat, .menuitem.button.flat, button.button.sidebar-button, notebook > header > tabs > arrow.button, popover.background checkbutton.button, popover.background radiobutton.button { padding: 4px 8px 5px 8px; } Now it uses asymmetric vertical padding and with this config I have a perfect match between gtk3 and QT menu items height. It might be useful if someone else could give it a try.
Can you submit those changes in a merge request so everyone else can benefit from them?
A possibly relevant merge request was started @ https://invent.kde.org/plasma/breeze-gtk/-/merge_requests/16
Git commit 538055e9f560b85e4a9aaac1242442b492d2a339 by Nate Graham, on behalf of Jan Blackquill. Committed on 05/03/2021 at 16:13. Pushed by ngraham into branch 'master'. Adjust menu heights to properly match Breeze QStyle, second time Looks like the menu height got adjusted again. M +1 -1 src/gtk3/widgets/_menus.scss M +1 -1 src/gtk4/widgets/_menus.scss https://invent.kde.org/plasma/breeze-gtk/commit/538055e9f560b85e4a9aaac1242442b492d2a339
Git commit 7be4c04e4dca2ba61b5822d8d50b7d3ee3a87702 by Nate Graham, on behalf of Jan Blackquill. Committed on 05/03/2021 at 16:20. Pushed by ngraham into branch 'Plasma/5.21'. Adjust menu heights to properly match Breeze QStyle, second time Looks like the menu height got adjusted again. (cherry picked from commit 538055e9f560b85e4a9aaac1242442b492d2a339) M +1 -1 src/gtk3/widgets/_menus.scss M +1 -1 src/gtk4/widgets/_menus.scss https://invent.kde.org/plasma/breeze-gtk/commit/7be4c04e4dca2ba61b5822d8d50b7d3ee3a87702
Maybe I'm wrong, but it seems to me that the merge request changes the horizontal padding and not the vertical one.
The bug is not fixed, I've tested on openSUSE Tumbleweed and Plasma 5.21.3 and menu items in gtk3 applications have greater heights than QT ones.
*** Bug 435126 has been marked as a duplicate of this bug. ***
Re-opening since apparently they are still not the same height.
Sorry for creating a duplicate bug, I was not able to find it previously reported. I'm happy to play around and attempt to create a PR, but I'm not sure how the Breeze GTK build system works. If I get the time, I'll try taking a look over the weekend
You can check out the last commit that attempted to fix it: https://invent.kde.org/plasma/breeze-gtk/commit/7be4c04e4dca2ba61b5822d8d50b7d3ee3a87702
A possibly relevant merge request was started @ https://invent.kde.org/plasma/breeze-gtk/-/merge_requests/45
Git commit dcd699bcd994acf6cda8f741850d0fed3d37cffb by Nate Graham, on behalf of Janet Blackquill. Committed on 28/02/2022 at 16:13. Pushed by ngraham into branch 'master'. gtk3, gtk4: shrink padding of menus by 1px FIXED-IN: 5.25 M +1 -1 src/gtk3/widgets/_menus.scss M +1 -1 src/gtk4/widgets/_menus.scss https://invent.kde.org/plasma/breeze-gtk/commit/dcd699bcd994acf6cda8f741850d0fed3d37cffb