nwg-piotr / nwg-look

GTK3 settings editor adapted to work in the wlroots environment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gtk-4 support

roland-5 opened this issue · comments

It would be awesome if nwg-look could handle gtk-4.

libadwaita support might be needed for this to work (granted, reddit says that libadwaita is quite easy to work around)


This is incorrect. Libadwaita is a wrapper around gtk4 and is not needed to make a gtk4 app. Libadwaita is only themable with an environment variable.

At the moment there are two paths: pure GTK4 and the other one, dependent on libadwaita. Gnome developers prefer the latter option, so applications written for Gnome are written with libadwaita in mind. At the moment, all I know is that inkscape will run on pure GTK4. GIMP, if it moves to GTK4, will follow the same path as inkscape. Libadwaita allows any option modifications ​​and styles at all?

From my limited research, so long as the theme properly supports gtk4, libadwaita can be forced to use that theme. There's also now themes and color palettes (each) that are unique to libadwaita that can't work on gtk4 only apps (in theory - I haven't seen any in practice).

Further, many settings such as the dark theme preference are ignored by libadwaita, though libadwaita does provide a setting for each of these.


This is partially incorrect. Libadwaita requires special support from theme developers in addition to gtk4 support.

Arch Wiki:

Note: For libadwaita-based GTK 4 applications, the chosen GTK theme needs special support and you are required to force a GTK theme with the GTK_THEME environment variable, or use a patched version of libadwaita: libadwaita-without-adwaita-gitAUR.

To launch apps with GTK_THEME=<theme_name> <command>, you may use nwg-drawer with the -ft (force theme) argument. It will check gsettings get org.gnome.desktop.interface gtk-theme and use the value as the theme name.

It's quite easy to use with nwg-shell:

obraz

Libadwaita aside, does this issue closure mean it works with gtk4 now? (An app could use gtk4 without libadwaita)

@Lazerbeak12345 Nwg-look can not "support GTK4", due to the reason I explained. You can use the workaround, which I mentioned above. I closed as completed by mistake. Should be: "Not planned".

I appreciate your engagement.

Isn't that workaround only needed for libadwaita? Inkscape, for example, has plans to eventually move to gtk4 - but will not be using libadwaita. This would mean gtk4 support will still be needed. From my research it's more or less identical to gtk3, but supporting gtk4 will not automatically work on the unwisely backwards incompatible libadwaita.

I'm not pushing for libadwaita support (anymore). Just gtk4.

I regret any confusion I may have caused to imply that gtk4 support would require libadwaita support. They are separate libraries, libadwaita being inferior and only configurable with the environment variable, while gtk4 can use config files, much like gtk3.

Well, I don't use gnome, and only have gnome-calculator installed for testing. This would need further investigation.

From my testing, nearly all gnome apps are libadwaita. I don't yet know of a good example of an app that is gtk4, but is not libadwaita.

Let me know when you find one, please.

The arch Linux package gtk4-demos includes a few - note that these are not "real-world" applications, but do seem to be great for testing theming tools like this one.

transmission-gtk is a real one

Nope it isn't. Transmission needs libadwaita.

vte4 is gtk4 only

vte4 is gtk4 only

And it seems to work perfectly well with nwg-look.

perfect! gtk4 must check the gtk3 settings, and just magically work! I hadn't had the time to test this myself!