Fix variant not changing on theme change
This commit is contained in:
+2
-3
@@ -50,6 +50,7 @@ function _get_theme() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _set_theme(theme) {
|
function _set_theme(theme) {
|
||||||
|
if ( theme === _get_theme() ) return;
|
||||||
interface_settings.set_string('gtk-theme', theme);
|
interface_settings.set_string('gtk-theme', theme);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,9 +74,7 @@ function _build_theme_variants() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _apply_theme_variant() {
|
function _apply_theme_variant() {
|
||||||
const variant = proxy.get_cached_property('NightLightActive');
|
nightlight_active = proxy.get_cached_property('NightLightActive').get_boolean();
|
||||||
if ( variant.get_boolean() === nightlight_active ) return;
|
|
||||||
nightlight_active = variant.get_boolean();
|
|
||||||
_set_theme(nightlight_active ? user_theme_night : user_theme_day);
|
_set_theme(nightlight_active ? user_theme_night : user_theme_day);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user