Skip to content

Commit

Permalink
Convert AutoDarkMode to a light Service
Browse files Browse the repository at this point in the history
  • Loading branch information
weisJ committed Aug 31, 2023
1 parent b570be0 commit bf3f5d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion plugin/src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
<applicationService serviceInterface="com.github.weisj.darkmode.platform.ThemeMonitorServiceProvider"
serviceImplementation="com.github.weisj.darkmode.platform.linux.LinuxThemeMonitorServiceProvider"
os="linux"/>
<applicationService serviceImplementation="com.github.weisj.darkmode.AutoDarkMode"/>
<applicationService serviceImplementation="com.github.weisj.darkmode.AutoDarkModeOptions"/>
<applicationConfigurable instance="com.github.weisj.darkmode.DarkModeConfigurable"
dynamic="true"/>
Expand Down

0 comments on commit bf3f5d1

Please sign in to comment.