Skip to content

Commit

Permalink
IntelliJ Themes: fixed text colors in ProgressBar (issue #138)
Browse files Browse the repository at this point in the history
  • Loading branch information
DevCharly committed Jul 31, 2020
1 parent 2f5ca20 commit ef38f38
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ FlatLaf Change Log
modifier key order conform with macOS standard. (issue #141)
- FileChooser: Fixed too small text field when renaming a file/directory in Flat
IntelliJ/Darcula themes. (issue #143)
- IntelliJ Themes: Fixed text colors in ProgressBar. (issue #138)


## 0.38
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ private void applyProperties( UIDefaults defaults ) {
applyColorPalette( defaults );
applyCheckBoxColors( defaults );

// copy values
for( Map.Entry<String, String> e : uiKeyCopying.entrySet() )
defaults.put( e.getKey(), defaults.get( e.getValue() ) );

// IDEA does not paint button background if disabled, but FlatLaf does
Object panelBackground = defaults.get( "Panel.background" );
defaults.put( "Button.disabledBackground", panelBackground );
Expand Down Expand Up @@ -466,10 +470,6 @@ private void applyCheckBoxColors( UIDefaults defaults ) {
defaults.remove( "CheckBox.icon[filled].selectedHoverBackground" );
defaults.remove( "CheckBox.icon[filled].selectedPressedBackground" );
}

// copy values
for( Map.Entry<String, String> e : uiKeyCopying.entrySet() )
defaults.put( e.getKey(), defaults.get( e.getValue() ) );
}

private static Map<String, String> uiKeyMapping = new HashMap<>();
Expand Down Expand Up @@ -514,6 +514,8 @@ private void applyCheckBoxColors( UIDefaults defaults ) {
uiKeyMapping.put( "ProgressBar.foreground", "" ); // ignore
uiKeyMapping.put( "ProgressBar.trackColor", "ProgressBar.background" );
uiKeyMapping.put( "ProgressBar.progressColor", "ProgressBar.foreground" );
uiKeyCopying.put( "ProgressBar.selectionForeground", "ProgressBar.background" );
uiKeyCopying.put( "ProgressBar.selectionBackground", "ProgressBar.foreground" );

// ScrollBar
uiKeyMapping.put( "ScrollBar.trackColor", "ScrollBar.track" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,24 @@ ToggleButton.endBackground=$ToggleButton.background

#---- theme specific ----

[Arc_Theme]ProgressBar.selectionBackground=#000
[Arc_Theme]ProgressBar.selectionForeground=#fff

[Arc_Theme_-_Orange]ProgressBar.selectionBackground=#000
[Arc_Theme_-_Orange]ProgressBar.selectionForeground=#fff

[Arc_Theme_Dark]ProgressBar.selectionBackground=#ddd
[Arc_Theme_Dark]ProgressBar.selectionForeground=#ddd

[Arc_Theme_Dark_-_Orange]ProgressBar.selectionBackground=#ddd
[Arc_Theme_Dark_-_Orange]ProgressBar.selectionForeground=#fff

[Cobalt_2]CheckBox.icon.background=#002946
[Cobalt_2]CheckBox.icon.checkmarkColor=#002946

[Dracula]ProgressBar.selectionBackground=#fff
[Dracula]ProgressBar.selectionForeground=#fff

[Gruvbox_Dark_Hard]ToggleButton.selectedBackground=$ToggleButton.selectedBackground
[Gruvbox_Dark_Hard]ToggleButton.toolbar.selectedBackground=$ToggleButton.toolbar.selectedBackground

Expand All @@ -65,3 +80,57 @@ ToggleButton.endBackground=$ToggleButton.background
[High_contrast]ToggleButton.selectedForeground=#000
[High_contrast]ToggleButton.disabledSelectedBackground=#444
[High_contrast]ToggleButton.toolbar.selectedBackground=#fff


# Material Theme UI Lite

[Dracula_Contrast]ProgressBar.selectionBackground=#fff
[Dracula_Contrast]ProgressBar.selectionForeground=#fff

[GitHub]ProgressBar.selectionBackground=#222
[GitHub]ProgressBar.selectionForeground=#222

[GitHub_Contrast]ProgressBar.selectionBackground=#222
[GitHub_Contrast]ProgressBar.selectionForeground=#222

[Light_Owl]ProgressBar.selectionBackground=#111
[Light_Owl]ProgressBar.selectionForeground=#fff

[Light_Owl_Contrast]ProgressBar.selectionBackground=#111
[Light_Owl_Contrast]ProgressBar.selectionForeground=#fff

[Material_Lighter]ProgressBar.selectionBackground=#222
[Material_Lighter]ProgressBar.selectionForeground=#fff

[Material_Lighter_Contrast]ProgressBar.selectionBackground=#222
[Material_Lighter_Contrast]ProgressBar.selectionForeground=#fff

[Material_Oceanic]ProgressBar.selectionBackground=#ddd
[Material_Oceanic]ProgressBar.selectionForeground=#ddd

[Material_Oceanic_Contrast]ProgressBar.selectionBackground=#ddd
[Material_Oceanic_Contrast]ProgressBar.selectionForeground=#ddd

[Material_Palenight]ProgressBar.selectionBackground=#ddd
[Material_Palenight]ProgressBar.selectionForeground=#ddd

[Material_Palenight_Contrast]ProgressBar.selectionBackground=#ddd
[Material_Palenight_Contrast]ProgressBar.selectionForeground=#ddd

[Night_Owl]ProgressBar.selectionBackground=#ddd
[Night_Owl]ProgressBar.selectionForeground=#ddd

[Night_Owl_Contrast]ProgressBar.selectionBackground=#ddd
[Night_Owl_Contrast]ProgressBar.selectionForeground=#ddd

[Solarized_Dark]ProgressBar.selectionBackground=#ccc
[Solarized_Dark]ProgressBar.selectionForeground=#ccc

[Material_Solarized_Dark_Contrast]ProgressBar.selectionBackground=#ccc
[Material_Solarized_Dark_Contrast]ProgressBar.selectionForeground=#ccc

[Solarized_Light]ProgressBar.selectionBackground=#222
[Solarized_Light]ProgressBar.selectionForeground=#fff

[Material_Solarized_Light_Contrast]ProgressBar.selectionBackground=#222
[Material_Solarized_Light_Contrast]ProgressBar.selectionForeground=#fff

0 comments on commit ef38f38

Please sign in to comment.