mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-12 15:07:11 -06:00
IntelliJ Themes: fixed foreground colors of disabled text in "Vuesion" theme
This commit is contained in:
@@ -33,6 +33,7 @@ FlatLaf Change Log
|
|||||||
not visible. (issue #686)
|
not visible. (issue #686)
|
||||||
- "Monocai" theme: Fixed unreadable text color of default buttons. (issue
|
- "Monocai" theme: Fixed unreadable text color of default buttons. (issue
|
||||||
#693)
|
#693)
|
||||||
|
- "Vuesion" theme: Fixed foreground colors of disabled text.
|
||||||
- CheckBox and RadioButton: Fixed unselected icon colors for themes "Atom One
|
- CheckBox and RadioButton: Fixed unselected icon colors for themes "Atom One
|
||||||
Light", "Cyan Light", "GitHub", "Light Owl", "Material Lighter" and
|
Light", "Cyan Light", "GitHub", "Light Owl", "Material Lighter" and
|
||||||
"Solarized Light".
|
"Solarized Light".
|
||||||
|
|||||||
@@ -28,10 +28,12 @@ import java.util.Collections;
|
|||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.Iterator;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.util.Map.Entry;
|
||||||
import javax.swing.UIDefaults;
|
import javax.swing.UIDefaults;
|
||||||
import javax.swing.plaf.ColorUIResource;
|
import javax.swing.plaf.ColorUIResource;
|
||||||
import com.formdev.flatlaf.json.Json;
|
import com.formdev.flatlaf.json.Json;
|
||||||
@@ -256,6 +258,33 @@ public class IntelliJTheme
|
|||||||
if( rowHeight > 22 )
|
if( rowHeight > 22 )
|
||||||
defaults.put( "Tree.rowHeight", 22 );
|
defaults.put( "Tree.rowHeight", 22 );
|
||||||
|
|
||||||
|
// get (and remove) theme specific wildcard replacements, which override all other defaults that end with same suffix
|
||||||
|
HashMap<String, Object> wildcards = new HashMap<>();
|
||||||
|
Iterator<Entry<Object, Object>> it = themeSpecificDefaults.entrySet().iterator();
|
||||||
|
while( it.hasNext() ) {
|
||||||
|
Entry<Object, Object> e = it.next();
|
||||||
|
String key = (String) e.getKey();
|
||||||
|
if( key.startsWith( "*." ) ) {
|
||||||
|
wildcards.put( key.substring( "*.".length() ), e.getValue() );
|
||||||
|
it.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// override UI defaults with theme specific wildcard replacements
|
||||||
|
if( !wildcards.isEmpty() ) {
|
||||||
|
for( Object key : defaults.keySet() ) {
|
||||||
|
int dot;
|
||||||
|
if( !(key instanceof String) ||
|
||||||
|
(dot = ((String)key).lastIndexOf( '.' )) < 0 )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
String wildcardKey = ((String)key).substring( dot + 1 );
|
||||||
|
Object wildcardValue = wildcards.get( wildcardKey );
|
||||||
|
if( wildcardValue != null )
|
||||||
|
defaults.put( key, wildcardValue );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// apply theme specific UI defaults at the end to allow overwriting
|
// apply theme specific UI defaults at the end to allow overwriting
|
||||||
for( Map.Entry<Object, Object> e : themeSpecificDefaults.entrySet() ) {
|
for( Map.Entry<Object, Object> e : themeSpecificDefaults.entrySet() ) {
|
||||||
Object key = e.getKey();
|
Object key = e.getKey();
|
||||||
|
|||||||
@@ -246,6 +246,9 @@ ToggleButton.endBackground = $ToggleButton.background
|
|||||||
|
|
||||||
[Spacegray]TextField.background = @ijTextBackgroundL4
|
[Spacegray]TextField.background = @ijTextBackgroundL4
|
||||||
|
|
||||||
|
[vuesion-theme]*.disabledForeground = #8C8C8C
|
||||||
|
[vuesion-theme]*.disabledText = #8C8C8C
|
||||||
|
[vuesion-theme]*.inactiveForeground = #8C8C8C
|
||||||
[vuesion-theme]Component.accentColor = lazy(Button.default.endBackground)
|
[vuesion-theme]Component.accentColor = lazy(Button.default.endBackground)
|
||||||
[vuesion-theme]MenuItem.checkBackground = @ijMenuCheckBackgroundL10
|
[vuesion-theme]MenuItem.checkBackground = @ijMenuCheckBackgroundL10
|
||||||
[vuesion-theme]MenuItem.underlineSelectionCheckBackground = @ijMenuCheckBackgroundL10
|
[vuesion-theme]MenuItem.underlineSelectionCheckBackground = @ijMenuCheckBackgroundL10
|
||||||
|
|||||||
Reference in New Issue
Block a user