Get right dark theme name for users of -light or -darker variants

This commit is contained in:
Romain Vigier
2019-10-16 16:30:19 +02:00
parent e6dce8931e
commit 778cb5ad7a
+2 -2
View File
@@ -52,8 +52,8 @@ function enable() {
user_theme_night = 'HighContrastInverse';
}
else {
user_theme_day = original_user_theme.replace('-dark', '');
user_theme_night = user_theme_day + '-dark';
user_theme_day = original_user_theme.replace(/(-dark)?/gi, '');
user_theme_night = user_theme_day.replace(/(-light)?(-darker)?/gi, '') + '-dark';
}
// Connect to session bus, listen to Color changes and change theme variant