From 170c22c5ed95eaec83656c8ce714264ce2b9bde2 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Wed, 2 Aug 2023 14:25:15 +0200 Subject: [PATCH] IntelliJ Themes: fixed unselected CheckBox and RadioButton icon colors for themes "Atom One Light", "Cyan Light", "GitHub", "Light Owl", "Material Lighter" and "Solarized Light" --- CHANGELOG.md | 3 +++ .../main/java/com/formdev/flatlaf/IntelliJTheme.java | 12 +----------- .../flatlaf/IntelliJTheme$ThemeLaf.properties | 2 ++ 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cda7a198..1061bbd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,9 @@ FlatLaf Change Log not visible. (issue #686) - "Monocai" theme: Fixed unreadable text color of default buttons. (issue #693) + - CheckBox and RadioButton: Fixed unselected icon colors for themes "Atom One + Light", "Cyan Light", "GitHub", "Light Owl", "Material Lighter" and + "Solarized Light". - TabbedPane: Fixed focused tab background color for themes "Arc *", "Material Design Dark", "Monocai", "One Dark", "Spacegray" and "Xcode-Dark". (issue #697) 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 52ce3fb0..4530b014 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java @@ -482,7 +482,7 @@ public class IntelliJTheme /** * Because IDEA uses SVGs for check boxes and radio buttons, the colors for - * this two components are specified in "icons > ColorPalette". + * these two components are specified in "icons > ColorPalette". * FlatLaf uses vector icons and expects colors for the two components in UI defaults. */ private void applyCheckBoxColors( UIDefaults defaults ) { @@ -502,16 +502,6 @@ public class IntelliJTheme if( !key.startsWith( "Checkbox." ) || !(value instanceof String) ) continue; - if( key.equals( "Checkbox.Background.Default" ) || - key.equals( "Checkbox.Foreground.Selected" ) ) - { - // This two keys do not work correctly in IDEA because they - // map SVG color "#ffffff" to another color, but checkBox.svg and - // radio.svg (in package com.intellij.ide.ui.laf.icons.intellij) - // use "#fff". So use white to get same appearance as in IDEA. - value = "#ffffff"; - } - String key2 = checkboxDuplicateColors.get( key ); if( dark ) diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/IntelliJTheme$ThemeLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/IntelliJTheme$ThemeLaf.properties index ebc565e0..3959639c 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/IntelliJTheme$ThemeLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/IntelliJTheme$ThemeLaf.properties @@ -196,6 +196,8 @@ ToggleButton.endBackground = $ToggleButton.background toolbar.selectedBackground: #fff [High_contrast][style]ToggleButton.inTextField = $[High_contrast][style]Button.inTextField +[Light_Flat]CheckBox.icon[filled].background = #fff +[Light_Flat]CheckBox.icon[filled].checkmarkColor = #fff [Light_Flat]Component.accentColor = lazy(TabbedPane.underlineColor) [Light_Flat]TableHeader.background = #E5E5E9