Browse Source

Set base icon colors in #loadIconTheme instead of #customizeIconTheme

pull/235/head
weisj 4 years ago
parent
commit
1e1b49707c
No known key found for this signature in database
GPG Key ID: 31124CB75461DA2A
  1. 7
      theme/src/main/java/com/github/weisj/darklaf/theme/DarculaTheme.java
  2. 8
      theme/src/main/java/com/github/weisj/darklaf/theme/HighContrastDarkTheme.java
  3. 8
      theme/src/main/java/com/github/weisj/darklaf/theme/HighContrastLightTheme.java
  4. 4
      theme/src/main/java/com/github/weisj/darklaf/theme/IntelliJTheme.java
  5. 1
      theme/src/main/java/com/github/weisj/darklaf/theme/OneDarkTheme.java

7
theme/src/main/java/com/github/weisj/darklaf/theme/DarculaTheme.java

@ -25,7 +25,6 @@ import java.util.Properties;
import javax.swing.*; import javax.swing.*;
import com.github.weisj.darklaf.PropertyLoader;
import com.github.weisj.darklaf.annotations.SynthesiseLaf; import com.github.weisj.darklaf.annotations.SynthesiseLaf;
import com.github.weisj.darklaf.theme.info.ColorToneRule; import com.github.weisj.darklaf.theme.info.ColorToneRule;
import com.github.weisj.darklaf.theme.info.PresetIconRule; import com.github.weisj.darklaf.theme.info.PresetIconRule;
@ -77,8 +76,8 @@ public class DarculaTheme extends Theme {
} }
@Override @Override
public void customizeIconTheme(final Properties properties, final UIDefaults currentDefaults) { public void loadIconTheme(final Properties properties, final UIDefaults currentDefaults) {
super.customizeIconTheme(properties, currentDefaults); super.loadIconTheme(properties, currentDefaults);
PropertyLoader.putProperties(loadPropertyFile("icons"), properties, currentDefaults); loadCustomProperties("icons", properties, currentDefaults);
} }
} }

8
theme/src/main/java/com/github/weisj/darklaf/theme/HighContrastDarkTheme.java

@ -37,7 +37,7 @@ public class HighContrastDarkTheme extends Theme {
@Override @Override
protected PresetIconRule getPresetIconRule() { protected PresetIconRule getPresetIconRule() {
return PresetIconRule.DARK; return PresetIconRule.NONE;
} }
@Override @Override
@ -81,10 +81,4 @@ public class HighContrastDarkTheme extends Theme {
super.customizePlatformProperties(properties, currentDefaults); super.customizePlatformProperties(properties, currentDefaults);
loadCustomProperties("platform", properties, currentDefaults); loadCustomProperties("platform", properties, currentDefaults);
} }
@Override
public void customizeIconTheme(final Properties properties, final UIDefaults currentDefaults) {
super.customizeIconTheme(properties, currentDefaults);
loadCustomProperties("icons", properties, currentDefaults);
}
} }

8
theme/src/main/java/com/github/weisj/darklaf/theme/HighContrastLightTheme.java

@ -37,7 +37,7 @@ public class HighContrastLightTheme extends Theme {
@Override @Override
protected PresetIconRule getPresetIconRule() { protected PresetIconRule getPresetIconRule() {
return PresetIconRule.LIGHT; return PresetIconRule.NONE;
} }
@Override @Override
@ -81,10 +81,4 @@ public class HighContrastLightTheme extends Theme {
super.customizePlatformProperties(properties, currentDefaults); super.customizePlatformProperties(properties, currentDefaults);
loadCustomProperties("platform", properties, currentDefaults); loadCustomProperties("platform", properties, currentDefaults);
} }
@Override
public void customizeIconTheme(final Properties properties, final UIDefaults currentDefaults) {
super.customizeIconTheme(properties, currentDefaults);
loadCustomProperties("icons", properties, currentDefaults);
}
} }

4
theme/src/main/java/com/github/weisj/darklaf/theme/IntelliJTheme.java

@ -72,8 +72,8 @@ public class IntelliJTheme extends Theme {
} }
@Override @Override
public void customizeIconTheme(final Properties properties, final UIDefaults currentDefaults) { public void loadIconTheme(final Properties properties, final UIDefaults currentDefaults) {
super.customizeIconTheme(properties, currentDefaults); super.loadIconTheme(properties, currentDefaults);
loadCustomProperties("icons", properties, currentDefaults); loadCustomProperties("icons", properties, currentDefaults);
} }

1
theme/src/main/java/com/github/weisj/darklaf/theme/OneDarkTheme.java

@ -81,7 +81,6 @@ public class OneDarkTheme extends Theme {
@Override @Override
public void customizeIconTheme(final Properties properties, final UIDefaults currentDefaults) { public void customizeIconTheme(final Properties properties, final UIDefaults currentDefaults) {
super.customizeIconTheme(properties, currentDefaults);
loadCustomProperties("icons_adjustments", properties, currentDefaults); loadCustomProperties("icons_adjustments", properties, currentDefaults);
} }
} }

Loading…
Cancel
Save