From 23f0504b3077b0b6d1ea5527adf800e7f6a74ec8 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Tue, 21 Apr 2020 10:45:40 +0200 Subject: [PATCH] IntelliJ Themes: fixed toggle button unselected background in most themes and foreground in Darcula and One Dark themes (issue #86) --- CHANGELOG.md | 6 ++++++ .../src/main/java/com/formdev/flatlaf/IntelliJTheme.java | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a443aa32..6dca8796 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ FlatLaf Change Log ================== +## Unreleased + +- IntelliJ Themes: Fixed button and toggle button colors. (issue #86) +- Updated IntelliJ Themes in demo to the latest versions. + + ## 0.31 - Focus indication border (or background) no longer hidden when temporary diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java index b66e3964..26b95c60 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java @@ -183,6 +183,14 @@ public class IntelliJTheme if( !uiKeys.contains( "Spinner.background" ) ) defaults.put( "Spinner.background", textFieldBackground ); } + + // fix ToggleButton + if( !uiKeys.contains( "ToggleButton.startBackground" ) && !uiKeys.contains( "*.startBackground" ) ) + defaults.put( "ToggleButton.startBackground", defaults.get( "Button.startBackground" ) ); + if( !uiKeys.contains( "ToggleButton.endBackground" ) && !uiKeys.contains( "*.endBackground" ) ) + defaults.put( "ToggleButton.endBackground", defaults.get( "Button.endBackground" ) ); + if( !uiKeys.contains( "ToggleButton.foreground" ) && uiKeys.contains( "Button.foreground" ) ) + defaults.put( "ToggleButton.foreground", defaults.get( "Button.foreground" ) ); } /**