New settings style and localization
I moved settings to Adw.PreferenceRow.
I also fixed localization and added Russian translation
This is great! This is a nice update as it's a much cleaner look using Adw controls for the prefrences.
I think this could be refined a bit more by removing the listbox and just adding the switchRow and spinRow controls directly to the page. A couple benefits include removing the ability to select/highlight a listbox item as this is not needed if you're not selecting an item from a list, and allowing the user to tab through all the controls and cycle back to the top after the last control.
Modifying the fillPreferencesWindow and removing buildPrefsWidget has this working for me:
fillPreferencesWindow(window) {
const page = new Adw.PreferencesPage();
const group = new Adw.PreferencesGroup({
title: _("Settings"),
});
let settings = this.getSettings();
group.add(this.buildSpin(settings, "window-opacity", [0, 255, 5, 50, 0], _("Opacity (0..255)")));
group.add(this.buildSpin(settings, "transition-time", [0, 1, 0.1, 0, 2], _("Animation time")));
group.add(this.buildSwitcher(settings, "transparent-on-moving", _("Transparent on moving")));
group.add(this.buildSwitcher(settings, "transparent-on-resizing", _("Transparent on resizing")));
page.add(group);
window.add(page);
}
I think this could be refined a bit more by removing the listbox and just adding the switchRow and spinRow controls directly to the page. A couple benefits include removing the ability to select/highlight a listbox item as this is not needed if you're not selecting an item
Thanks for your advice! I simply didn't know how Adw.PreferencesGroup works
This looks great! The updates are working well for me (running Ubuntu 24.04).