From 950f8d6666cf69e3960e844ff5fecdc63165c2f1 Mon Sep 17 00:00:00 2001 From: Jannis Weis <31143295+weisJ@users.noreply.github.com> Date: Sun, 3 Sep 2023 13:39:10 +0200 Subject: [PATCH] Handle GNOME color-scheme values Relates to #72 --- .../github/weisj/darkmode/platform/linux/gtk/GtkVariants.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linux/gtk/src/main/java/com/github/weisj/darkmode/platform/linux/gtk/GtkVariants.kt b/linux/gtk/src/main/java/com/github/weisj/darkmode/platform/linux/gtk/GtkVariants.kt index f5ab4bcd..0db1898d 100644 --- a/linux/gtk/src/main/java/com/github/weisj/darkmode/platform/linux/gtk/GtkVariants.kt +++ b/linux/gtk/src/main/java/com/github/weisj/darkmode/platform/linux/gtk/GtkVariants.kt @@ -68,6 +68,11 @@ object GtkVariants { val variants: MutableMap = EnumMap(Variant::class.java) variants[Variant.Original] = themeName when { + themeName == "default" || themeName == "prefer-dark" -> { + // Gor GNOME these values have to be handled separately + variants[Variant.Day] = "default" + variants[Variant.Night] = "prefer-dark" + } themeName.contains("Adapta") -> { variants[Variant.Day] = themeName.replace("-Nokto", "") variants[Variant.Night] = variants[Variant.Day]!!.replace("Adapta", "Adapta-Nokto")