Listen to the root property change to get the preferences window
This commit is contained in:
+1
-1
@@ -31,7 +31,7 @@ function init() {
|
|||||||
*/
|
*/
|
||||||
function buildPrefsWidget() {
|
function buildPrefsWidget() {
|
||||||
const preferences = new Preferences();
|
const preferences = new Preferences();
|
||||||
GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
|
preferences.connect('notify::root', () => {
|
||||||
const window = preferences.get_root();
|
const window = preferences.get_root();
|
||||||
window.add_css_class('nightthemeswitcher');
|
window.add_css_class('nightthemeswitcher');
|
||||||
const headerbar = new Headerbar({ preferences });
|
const headerbar = new Headerbar({ preferences });
|
||||||
|
|||||||
Reference in New Issue
Block a user