puppylinux-woof-CE / woof-CE

woof - the Puppy builder
GNU General Public License v2.0
393 stars 283 forks source link

Faulty rendering of some GTK3 applications by Puppy-specific GTK3 themes #4174

Closed radky2 closed 11 months ago

radky2 commented 11 months ago

While testing BW32 and BW64 with Puppy-specific GTK3 themes (such as Flat-grey-rounded), opening the Preferences dialog of simple-scan document scanner will generate the following warning:

(simple-scan:12708): Gtk-WARNING **: 19:15:33.270: Negative content height -9 (allocation 1, extents 5x5) while allocating gadget (node button, owner GtkButton

In the above scenario, the titlebar height of the Preferences dialog is markedly truncated and there are no buttons to minimize, maximize or close the dialog.

The following link references the same issue reported in the ubuntu-mate community.

https://ubuntu-mate.community/t/document-scanner-aka-simple-scan/25284

In BW32 and BW64, non-Puppy GTK3 themes (such as Numix and Graphite) correctly generate the titlebar of the simple-scan Preferences dialog and the Close button is present.

Is it possible to adjust the GtkButton code of the Puppy-specific GTK3 themes such that titlebars render correctly ?

Thanks

dimkr commented 11 months ago

I think the main question is not how to fix the Puppy themes, but whether or not to drop themes altogether. See https://stopthemingmy.app/.

Yes, I know, GTK+ 3 applications are more compact when they use these themes, like the ancient GTK+ 2 applications, and they seem to render faster (probably because CSS is so much simpler compared to Adwaita - less rounded corners, shadows, etc'). However, themes are super hard to maintain (they break often and some applications do their own styling and break): that's why pretty much all distros switched to Adwaita or a theme forked from Adwaita, with subtle changes but not more. And, even non-Puppy themes like Numix break some applications, so switching to a third party theme is not a good alternative.

GTK+ 4 makes things much worse because most GTK+ 4 applications use libadwaita and forced to use the Adwaita theme. Applications are already migrating away from GTK+ 3, so I don't know if fixing the themes is worth the effort, and porting them to GTK+ 4 is definitely a waste of time.

The only viable path forward, unless someone decides to adopt these themes and test every application known to be problematic after each change (plus convince GNOME to provide proper theme support in libadwaita, which is not going to happen), is accent colors. See https://github.com/GradienceTeam/Gradience and accent color support in xdg-desktop-portal.

radky2 commented 11 months ago

@dimkr

The missing interactive buttons in the titlebar of the simple-scan Preferences dialog may confuse some users -- but the issue is not critical. Fortunately, pressing the keyboard ESC key will close the dialog.

Thanks for your helpful response. Much appreciated.

dimkr commented 11 months ago

(I think it would be better to use https://github.com/puppylinux-woof-CE/woof-CE/discussions if you want to ask a question, instead of opening and closing an issue, which may create the false impression that the question is actually an issue, one that was fixed.)