Breaking: Make preferences usable again and support Gnome Shell 42

Make the preferences usable again (and look good) by using an
`AdwPreferencesPage` as well as various other libadwaita features (like
`AdwPreferencesGroup`, style classes, ...).
Also get rid of some code, which now doesn't seem to be necessary
anymore (making sure no horizontal scrollbar shows and setting a default
size for the preferences window).

This change is marked as "Breaking", since I assume `AdwPreferencesPage`
doesn't work in Gnome Shell 40 and because I changed the supported Gnome
Shell version to 42 accordingly.
This commit is contained in:
June 2022-10-23 22:10:36 +02:00
commit 249f3554d5
No known key found for this signature in database
GPG key ID: 094C2AC34192FA11
6 changed files with 49 additions and 84 deletions

View file

@ -1,7 +1,7 @@
/*
* This file is part of Top-Bar-Organizer (a Gnome Shell Extension for
* organizing your Gnome Shell top bar).
* Copyright (C) 2021 Julian Schacher
* Copyright (C) 2021-2022 Julian Schacher
*
* Top-Bar-Organizer is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -23,6 +23,7 @@ const Gtk = imports.gi.Gtk;
const Gdk = imports.gi.Gdk;
const Gio = imports.gi.Gio;
const GObject = imports.gi.GObject;
const Adw = imports.gi.Adw;
const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
@ -34,7 +35,7 @@ var PrefsBoxOrderItemRow = GObject.registerClass({
"item-name-display-label",
"menu-button"
]
}, class PrefsBoxOrderItemRow extends Gtk.ListBoxRow {
}, class PrefsBoxOrderItemRow extends Adw.ActionRow {
_init(params = {}, scrollManager, item) {
super._init(params);