Bug 430081 - Preference windows built with libhandy may not render correctly
Summary: Preference windows built with libhandy may not render correctly
Status: RESOLVED FIXED
Alias: None
Product: Breeze
Classification: Plasma
Component: gtk theme (show other bugs)
Version: 5.19.5
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Janet Blackquill
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-06 15:31 UTC by Michael Terry
Modified: 2021-03-05 15:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.21.3


Attachments
Test script (441 bytes, text/x-python)
2020-12-06 15:31 UTC, Michael Terry
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Terry 2020-12-06 15:31:03 UTC
Created attachment 133903 [details]
Test script

SUMMARY

Libhandy is a widget library for GNOME apps.
https://gnome.pages.gitlab.gnome.org/libhandy/

It offers a preference window widget that can have an optional search button in its header bar.

If you turn off that search button feature, Breeze freaks out and does not render the header bar at all.

This is rather unfortunate, since the user may not be able to access all pages of preferences. Nor be able to easily close the window.

STEPS TO REPRODUCE
1. Download the attached test script handy_prefs.py
2. Run it like `python3 handy_prefs.py`

OBSERVED RESULT
Window has no header bar at all.

In the console, you can see errors like:

Negative content height -9 (allocation 1, extents 5x5) while allocating gadget (node button, owner GtkButton)

(The blank main content is expected, as my test script doesn't add anything there.)

EXPECTED RESULT
The header bar is visible.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Ubuntu 20.10
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.14.2
Comment 1 Bug Janitor Service 2021-03-04 22:43:34 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/breeze-gtk/-/merge_requests/17
Comment 2 Janet Blackquill 2021-03-05 15:57:59 UTC
Git commit 9bd3044d3149bf50b30587f477b19a7e90c12896 by Jan Blackquill.
Committed on 04/03/2021 at 22:43.
Pushed by ngraham into branch 'master'.

gtk3, gtk4: unscrew libhandy's height

Looks like libhandy requires the style to set a minimum height
for titlebars; themes that fail to do so will get broken apps.
I picked 46px because that's what Adwaita uses, and I fear that
deviating from that will cause apps to potentially break.

M  +3    -0    src/gtk3/widgets/_window_decorations.scss
M  +4    -0    src/gtk4/widgets/_window_decorations.scss

https://invent.kde.org/plasma/breeze-gtk/commit/9bd3044d3149bf50b30587f477b19a7e90c12896
Comment 3 Nate Graham 2021-03-05 15:58:32 UTC
Git commit 72b568275a5ef464f133a62db875740a89598b49 by Nate Graham, on behalf of Jan Blackquill.
Committed on 05/03/2021 at 15:58.
Pushed by ngraham into branch 'Plasma/5.21'.

gtk3, gtk4: unscrew libhandy's height

Looks like libhandy requires the style to set a minimum height
for titlebars; themes that fail to do so will get broken apps.
I picked 46px because that's what Adwaita uses, and I fear that
deviating from that will cause apps to potentially break.


(cherry picked from commit 9bd3044d3149bf50b30587f477b19a7e90c12896)

M  +3    -0    src/gtk3/widgets/_window_decorations.scss
M  +4    -0    src/gtk4/widgets/_window_decorations.scss

https://invent.kde.org/plasma/breeze-gtk/commit/72b568275a5ef464f133a62db875740a89598b49