From bf3f5d190f019c74529d6521d30c15a4adae58ef Mon Sep 17 00:00:00 2001
From: Jannis Weis <31143295+weisJ@users.noreply.github.com>
Date: Thu, 31 Aug 2023 14:08:11 +0200
Subject: [PATCH] Convert AutoDarkMode to a light Service
---
plugin/src/main/java/com/github/weisj/darkmode/AutoDarkMode.kt | 2 ++
plugin/src/main/resources/META-INF/plugin.xml | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/plugin/src/main/java/com/github/weisj/darkmode/AutoDarkMode.kt b/plugin/src/main/java/com/github/weisj/darkmode/AutoDarkMode.kt
index d12dedd9..c55ca700 100644
--- a/plugin/src/main/java/com/github/weisj/darkmode/AutoDarkMode.kt
+++ b/plugin/src/main/java/com/github/weisj/darkmode/AutoDarkMode.kt
@@ -31,6 +31,7 @@ import com.intellij.ide.actions.QuickChangeLookAndFeel
import com.intellij.ide.ui.LafManager
import com.intellij.openapi.Disposable
import com.intellij.openapi.application.ApplicationManager
+import com.intellij.openapi.components.Service
import com.intellij.openapi.editor.colors.EditorColorsManager
import com.intellij.openapi.editor.colors.EditorColorsScheme
import com.intellij.openapi.util.registry.Registry
@@ -41,6 +42,7 @@ import javax.swing.UIManager.LookAndFeelInfo
/**
* Automatically changes the IDEA theme based on system settings.
*/
+@Service
class AutoDarkMode : Disposable, ThemeCallback {
private val alarm = Alarm(Alarm.ThreadToUse.SWING_THREAD, this)
private val implProvider by lazy {
diff --git a/plugin/src/main/resources/META-INF/plugin.xml b/plugin/src/main/resources/META-INF/plugin.xml
index 4b08d503..df5e1af4 100644
--- a/plugin/src/main/resources/META-INF/plugin.xml
+++ b/plugin/src/main/resources/META-INF/plugin.xml
@@ -62,7 +62,6 @@
-