[gnome-maps] utils: Add function to detect if set to prefer dark theme
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] utils: Add function to detect if set to prefer dark theme
- Date: Fri, 22 Sep 2017 09:22:51 +0000 (UTC)
commit b719aaf0fc9663e1b1445acb930aff1882d5ae73
Author: Marcus Lundblad <ml update uu se>
Date: Wed Jun 28 22:38:40 2017 +0200
utils: Add function to detect if set to prefer dark theme
https://bugzilla.gnome.org/show_bug.cgi?id=783602
src/utils.js | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/utils.js b/src/utils.js
index c7fccc3..e738ec6 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -388,3 +388,9 @@ function normalizeString(string) {
let normalized = GLib.utf8_normalize(string, -1, GLib.NormalizeMode.ALL);
return normalized.replace(ACCENTS_REGEX, '');
}
+
+function isUsingDarkThemeVariant() {
+ let gtkSettings = Gtk.Settings.get_default();
+
+ return gtkSettings.gtk_application_prefer_dark_theme;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]