[gnome-maps] utils: Add function to determine if using high contrast theme



commit bcf110faf545486acbfaba42157c46c441d959ab
Author: Marcus Lundblad <ml update uu se>
Date:   Tue Oct 10 21:40:51 2017 +0200

    utils: Add function to determine if using high contrast theme
    
    https://bugzilla.gnome.org/show_bug.cgi?id=788738

 src/utils.js |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/utils.js b/src/utils.js
index e738ec6..c69f77d 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -394,3 +394,10 @@ function isUsingDarkThemeVariant() {
 
     return gtkSettings.gtk_application_prefer_dark_theme;
 }
+
+function isUsingHighContrastTheme() {
+    let gtkSettings = Gtk.Settings.get_default();
+    let themeName = gtkSettings.gtk_theme_name;
+
+    return themeName === 'HighContrast' || themeName === 'HighContrastInverse';
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]