gicmo / gamemode-extension

GNOME Shell extension for Feral Interactive's GameMode
GNU Lesser General Public License v2.1
148 stars 17 forks source link

Adopt libadwaita in gnome-shell 42? #53

Closed fjsevilla-dev closed 2 years ago

fjsevilla-dev commented 2 years ago

Hi;

Gnome-shell 42 is using Adw.PreferencesWindow instead of Gtk.Window for extension preferences dialog, so we can use Libadwaita widgets. I don't know if you have considered using libadwaita in the extension, the truth is that for now it is not strictly necessary to use it to support Gnome 42, not even implementing fillPreferencesWindow in prefs.js, adding the new version to metadata.json is sufficient.

Aside from preparing for the future (ʘ‿ʘ), since most of the GNOME core apps already use libadwaita in gnome 42 (and the rest are in the pipeline), I think the biggest advantage of using libadwaita is that it allows the extension to integrate better with the rest of the desktop, with DE themes, the new system-wide dark mode setting, etc.

This afternoon I've been tinkering with the extension so that it can use libadwaita in Gnome 42, this is the result:

https://github.com/fjsevilla-dev/gamemode-extension/blob/libadwaita_port/prefs.js#L151

and this is how it looks (tested on Arch with gnome-shell 42.0, the default Adwaita theme and witch system-wide dark mode off/on ):

adw_prefs

The code for Gnome 42 is separate from the previous versions, but it's just a test :), there are many ways to implement it, If it is of interest, I will help in any way I can.

gicmo commented 2 years ago

Yes please! I don't have that much time to work on it myself but would happily review and merge patches!