[gnome-shell-extensions/wip/fmuellner/gtk4: 52/55] user-theme: Stop using header func for separators
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions/wip/fmuellner/gtk4: 52/55] user-theme: Stop using header func for separators
- Date: Thu, 3 Dec 2020 02:06:39 +0000 (UTC)
commit 7eb05902f0f39f33a6fa84e8b11eacdf48d2efa8
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Apr 15 23:32:20 2020 +0200
user-theme: Stop using header func for separators
GTK4 provides built-in support for this common pattern, so use
that instead.
extensions/user-theme/prefs.js | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
---
diff --git a/extensions/user-theme/prefs.js b/extensions/user-theme/prefs.js
index a36be26..b9c12fa 100644
--- a/extensions/user-theme/prefs.js
+++ b/extensions/user-theme/prefs.js
@@ -30,6 +30,7 @@ class UserThemePrefsWidget extends Gtk.ScrolledWindow {
this._list = new Gtk.ListBox({
selection_mode: Gtk.SelectionMode.NONE,
+ show_separators: true,
halign: Gtk.Align.CENTER,
valign: Gtk.Align.START,
hexpand: true,
@@ -39,7 +40,6 @@ class UserThemePrefsWidget extends Gtk.ScrolledWindow {
margin_bottom: 60,
});
this._list.get_style_context().add_class('frame');
- this._list.set_header_func(this._updateHeader.bind(this));
box.append(this._list);
this._actionGroup = new Gio.SimpleActionGroup();
@@ -123,12 +123,6 @@ class UserThemePrefsWidget extends Gtk.ScrolledWindow {
return fileInfos.map(info => info.get_name());
}
-
- _updateHeader(row, before) {
- if (!before || row.get_header())
- return;
- row.set_header(new Gtk.Separator());
- }
});
const ThemeRow = GObject.registerClass(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]