Skip to content

Commit

Permalink
Tuned theme switcher a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
kirilenkobm committed Jul 31, 2023
1 parent 432508b commit deb47f1
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/main/kotlin/util/PopupViewThemeManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,35 @@ object PopupViewThemeManager : SettingsObserver {

private fun setDarkTheme() {
UIManager.put("OptionPane.background", Color.DARK_GRAY)
UIManager.put("Panel.background", Color.DARK_GRAY)
UIManager.put("OptionPane.foreground", Color.DARK_GRAY)
UIManager.put("OptionPane.messageForeground", Color.WHITE)
UIManager.put("Panel.background", Color.DARK_GRAY)
UIManager.put("Panel.foreground", Color.WHITE)
UIManager.put("Label.foreground", Color.WHITE)
UIManager.put("Button.background", Color.GRAY)
UIManager.put("Button.foreground", Color.WHITE)
UIManager.put("ComboBox.background", Color.DARK_GRAY)
UIManager.put("ComboBox.foreground", Color.WHITE)
UIManager.put("ComboBox.selectionBackground", Color.GRAY)
UIManager.put("ComboBox.selectionForeground", Color.WHITE)
UIManager.put("CheckBox.foreground", Color.WHITE)
}

private fun setDefaultTheme() {
// in light theme - just reset to defaults
UIManager.put("OptionPane.background", null)
UIManager.put("Panel.background", null)
UIManager.put("OptionPane.foreground", null)
UIManager.put("OptionPane.messageForeground", null)
UIManager.put("Panel.background", null)
UIManager.put("Panel.foreground", null)
UIManager.put("Label.foreground", null)
UIManager.put("Button.background", null)
UIManager.put("Button.foreground", null)
UIManager.put("ComboBox.background", null)
UIManager.put("ComboBox.foreground", null)
UIManager.put("ComboBox.selectionBackground", null)
UIManager.put("ComboBox.selectionForeground", null)
UIManager.put("CheckBox.foreground", null)
}

override fun onColorThemeChanged(newColorTheme: ColorTheme) {
Expand Down

0 comments on commit deb47f1

Please sign in to comment.