SteamOS icon indicating copy to clipboard operation
SteamOS copied to clipboard

Zenity: Use GTK3 version instead of GTK4 and LibAdwaita

Open TiZ-HugLife opened this issue 1 year ago • 3 comments

Your system information

  • Steam client version: (not relevant)
  • SteamOS version: 3.6.2
  • Opted into Steam client beta?: Yes
  • Opted into SteamOS beta?: Yes
  • Have you checked for updates in Settings > System?: Yes

Please describe your issue in as much detail as possible:

It looks like Zenity in SteamOS 3.6 is using LibAdwaita, which means that it does not use the Breeze GTK theme, and all of its proportions are super out of whack. There are a lot of scripts that hard-code a size for the Zenity dialog, such as the Decky installer, and because LibAdwaita's proportions are so huge, you pretty much can't actually read the dialog anymore. What's more, SteamOS 3.6 ships with a dark theme, and despite all the effort to plumb light/dark theme settings into various parts of the desktop interoperability stacks, LibAdwaita-based Zenity uses the light theme.

Zenity should be replaced with zenity-gtk3 in order to maintain script compatibility and desktop cohesion. Desktop-agnostic script dialogs are no place for GNOME to assert their dominance. I am not sure if it is possible to compile Zenity without LibAdwaita, but Breeze does have a good GTK4 theme, and that could be a potential alternative.

Steps for reproducing this issue:

  1. Download and run the Decky installer.
  2. See a bright-white LibAdwaita Zenity with huge padding that is nearly unusable due to the hard-coded dialog size.

TiZ-HugLife avatar Jun 03 '24 20:06 TiZ-HugLife

https://github.com/ValveSoftware/SteamOS/issues/1534#issue-2331953657

@TiZ-HugLife, could you attach a screenshot of the unthemed window?

RokeJulianLockhart avatar Jun 10 '24 14:06 RokeJulianLockhart

fwiw we're mostly trying to not use zenity for anything moving forward

TTimo avatar Jun 10 '24 16:06 TTimo

It looks like Zenity in SteamOS 3.6 is using LibAdwaita, which means that it does not use the Breeze GTK theme,

Yes, that is correct.

There are a lot of scripts that hard-code a size for the Zenity dialog, such as the Decky installer, and because LibAdwaita's proportions are so huge, you pretty much can't actually read the dialog anymore.

Regardless of theming, hard-coding sizes for windows is a pretty terrible idea, because all it takes is a font change, or a localisation change, and you'll get a broken output.

What's more, SteamOS 3.6 ships with a dark theme, and despite all the effort to plumb light/dark theme settings into various parts of the desktop interoperability stacks, LibAdwaita-based Zenity uses the light theme.

This should only happen in the game session, where there are no portals; the desktop session has the settings portal, and that comes with the color scheme key; make sure that either the xdg-desktop-portal-kde and/or the xdg-desktop-portal-gtk are installed. You'll still get the GNOME default theme instead of Breeze, but it will have both light and dark variants.

Zenity should be replaced with zenity-gtk3 in order to maintain script compatibility and desktop cohesion.

If the goal is to maximise use of the Breeze theme, then yes: building zenity from the zenity-3-44 branch is definitely the best option.

Desktop-agnostic script dialogs are no place for GNOME to assert their dominance

There's no "assertion of dominance" in play, here, so please: don't ascribe malicious intent to the GNOME project, which is not involved in what software is shipped on SteamOS.

ebassi avatar Jun 11 '24 14:06 ebassi

Thank you OP for mentioning zenity-gtk3 which I now use to replace zenity.

The visual difference because of the extremely large paddings and borders looked so out of place and alien to my desktop. Also, the mix of qt+gtk3 is much more pleasant to the eye than qt+gtk4.

As a bonus I finally could remove libadwaita from my system. :beer:

allergicapple avatar Nov 03 '24 07:11 allergicapple

I believe that the downvotes come from the current title, which includes the preferred solution alongside the problem. This is despite the aforestated alternative (as undermentioned):

I am not sure if it is possible to compile Zenity without LibAdwaita, but Breeze does have a good GTK4 theme, and that could be a potential alternative.

Consequently, the title should ideally be rephrased to something similar to "The GTK4 Zenith dialogue does not adhere to the system theme", so that we can decide within the issue comments what solution gets the dialog the closest to system theme adherence whilst ideally not downgrading the technologies utilized to render it.

Alternatively, Value could switch to Qt 6, but I've little hope of them bothering to.

RokeJulianLockhart avatar Nov 03 '24 10:11 RokeJulianLockhart

SteamOS 3.6 stable now comes with zenity-gtk3 instead of the gtk4 version, can we close this issue then or is there anything else that needs to be done?

bertogg avatar Nov 15 '24 10:11 bertogg

I can confirm that SteamOS 3.6 is using zenity-gtk3 instead of Adwaita zenity. The Breeze GTK3 theme is applied and the widget proportions are as expected. Thank you for shipping zenity-gtk3. :)

TiZ-HugLife avatar Nov 15 '24 15:11 TiZ-HugLife