Browse Source

Moved themes to own module.

Decoupled loading of ui properties from theme properties.
pull/127/head
weisj 5 years ago
parent
commit
f866e503a7
  1. 1
      core/build.gradle.kts
  2. 5
      core/src/main/java/com/github/weisj/darklaf/task/FontDefaultsInitTask.java
  3. 13
      core/src/main/java/com/github/weisj/darklaf/task/PropertyFontMapper.java
  4. 63
      core/src/main/java/com/github/weisj/darklaf/task/ThemeDefaultsInitTask.java
  5. 12
      core/src/test/java/theme/MyCustomTheme.java
  6. 1
      settings.gradle.kts
  7. 7
      theme/build.gradle.kts
  8. 0
      theme/src/main/java/com/github/weisj/darklaf/theme/ColorToneRule.java
  9. 0
      theme/src/main/java/com/github/weisj/darklaf/theme/ContrastRule.java
  10. 0
      theme/src/main/java/com/github/weisj/darklaf/theme/DarculaTheme.java
  11. 0
      theme/src/main/java/com/github/weisj/darklaf/theme/DefaultThemeProvider.java
  12. 0
      theme/src/main/java/com/github/weisj/darklaf/theme/FontMapper.java
  13. 6
      theme/src/main/java/com/github/weisj/darklaf/theme/FontSizeRule.java
  14. 8
      theme/src/main/java/com/github/weisj/darklaf/theme/HighContrastDarkTheme.java
  15. 8
      theme/src/main/java/com/github/weisj/darklaf/theme/HighContrastLightTheme.java
  16. 4
      theme/src/main/java/com/github/weisj/darklaf/theme/IntelliJTheme.java
  17. 0
      theme/src/main/java/com/github/weisj/darklaf/theme/PreferredThemeStyle.java
  18. 0
      theme/src/main/java/com/github/weisj/darklaf/theme/PresetIconRule.java
  19. 4
      theme/src/main/java/com/github/weisj/darklaf/theme/SolarizedDarkTheme.java
  20. 4
      theme/src/main/java/com/github/weisj/darklaf/theme/SolarizedLightTheme.java
  21. 53
      theme/src/main/java/com/github/weisj/darklaf/theme/Theme.java
  22. 0
      theme/src/main/java/com/github/weisj/darklaf/theme/ThemeProvider.java
  23. 0
      theme/src/main/java/com/github/weisj/darklaf/theme/UnsupportedThemeException.java
  24. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/darcula/darcula_defaults.properties
  25. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/darcula/darcula_styleSheet.css
  26. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_dark/high_contrast_dark_defaults.properties
  27. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_dark/high_contrast_dark_icons.properties
  28. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_dark/high_contrast_dark_platform.properties
  29. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_dark/high_contrast_dark_styleSheet.css
  30. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_dark/high_contrast_dark_ui.properties
  31. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_light/high_contrast_light_defaults.properties
  32. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_light/high_contrast_light_icons.properties
  33. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_light/high_contrast_light_platform.properties
  34. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_light/high_contrast_light_styleSheet.css
  35. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_light/high_contrast_light_ui.properties
  36. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/icon_presets/dark_icons.properties
  37. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/icon_presets/light_icons.properties
  38. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_defaults.properties
  39. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_styleSheet.css
  40. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_ui.properties
  41. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_defaults.properties
  42. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_icons.properties
  43. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_styleSheet.css
  44. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_ui.properties
  45. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_defaults.properties
  46. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_icons.properties
  47. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_styleSheet.css
  48. 0
      theme/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_ui.properties

1
core/build.gradle.kts

@ -8,6 +8,7 @@ plugins {
}
dependencies {
implementation(project(":darklaf-theme"))
implementation(project(":darklaf-native-utils"))
implementation(project(":darklaf-utils"))
implementation(project(":darklaf-platform-base"))

5
core/src/main/java/com/github/weisj/darklaf/task/FontDefaultsInitTask.java

@ -47,6 +47,7 @@ public class FontDefaultsInitTask implements DefaultsInitTask {
private static final String MAC_OS_CATALINA_FONT_NAME = ".AppleSystemUIFont";
private static final String MAC_OS_FONT_NAME = ".SF NS Text";
private final PropertyFontMapper fontMapper = new PropertyFontMapper();
@Override
public void run(final Theme currentTheme, final Map<Object, Object> defaults) {
@ -108,7 +109,7 @@ public class FontDefaultsInitTask implements DefaultsInitTask {
}
private FontMapper getFontMapper(final FontSizeRule rule) {
if (rule == null) return (font, defaults) -> font;
return rule.getFontMapper();
fontMapper.setPropertyKey(rule == null ? null : rule.getPropertyKey());
return fontMapper;
}
}

13
core/src/main/java/com/github/weisj/darklaf/theme/PropertyFontMapper.java → core/src/main/java/com/github/weisj/darklaf/task/PropertyFontMapper.java

@ -21,9 +21,11 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.github.weisj.darklaf.theme;
package com.github.weisj.darklaf.task;
import com.github.weisj.darklaf.LafManager;
import com.github.weisj.darklaf.theme.FontMapper;
import com.github.weisj.darklaf.theme.Theme;
import java.awt.*;
import java.util.Map;
@ -37,12 +39,21 @@ public class PropertyFontMapper implements FontMapper {
private int adjustment;
private String propertyKey;
public PropertyFontMapper() {
this(null);
}
public PropertyFontMapper(final String propertyKey) {
this.propertyKey = propertyKey;
}
public void setPropertyKey(final String propertyKey) {
this.propertyKey = propertyKey;
}
@Override
public Font map(final Font font, final Map<Object, Object> defaults) {
if (propertyKey == null) return font;
adjustment = getSize(defaults);
// No need to create a new font.
if (adjustment == 0) return font;

63
core/src/main/java/com/github/weisj/darklaf/task/ThemeDefaultsInitTask.java

@ -23,13 +23,14 @@
*/
package com.github.weisj.darklaf.task;
import com.github.weisj.darklaf.DarkLaf;
import com.github.weisj.darklaf.PropertyLoader;
import com.github.weisj.darklaf.platform.Decorations;
import com.github.weisj.darklaf.theme.Theme;
import com.github.weisj.darklaf.util.SystemInfo;
import javax.swing.*;
import javax.swing.text.html.HTMLEditorKit;
import javax.swing.text.html.StyleSheet;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
@ -38,6 +39,16 @@ public class ThemeDefaultsInitTask implements DefaultsInitTask {
private static final String GLOBAL_PREFIX = "global.";
private static final String MAC_OS_MENU_BAR_KEY = "apple.laf.useScreenMenuBar";
private static final String[] UI_PROPERTIES = new String[]{
"borders", "button", "checkBox", "colorChooser", "comboBox", "fileChooser", "tristate",
"internalFrame", "label", "list", "menu", "menuBar", "menuItem", "numberingPane", "optionPane", "panel",
"popupMenu", "progressBar", "radioButton", "rootPane", "scrollBar", "scrollPane", "separator",
"slider", "spinner", "splitPane", "statusBar", "tabbedPane", "tabFrame", "table", "taskPane", "text",
"toggleButton", "toolBar", "toolTip", "tree",
};
private static final String[] ICON_PROPERTIES = new String[]{
"control", "dialog", "files", "frame", "indicator", "menu", "misc", "navigation"
};
private final DefaultsInitTask userPreferenceInitTask = new UserPreferenceInitTask();
@Override
@ -56,17 +67,24 @@ public class ThemeDefaultsInitTask implements DefaultsInitTask {
*/
userPreferenceInitTask.run(currentTheme, uiProps);
currentTheme.loadGlobals(uiProps, defaults);
installGlobals(uiProps, defaults);
currentTheme.loadUIProperties(uiProps, defaults);
currentTheme.loadIconProperties(uiProps, defaults);
initGlobals(currentTheme, defaults, uiProps);
initUIProperties(currentTheme, defaults, uiProps);
initIconTheme(currentTheme, defaults, uiProps);
initPlatformProperties(currentTheme, defaults, uiProps);
Decorations.loadDecorationProperties(uiProps, defaults);
currentTheme.loadPlatformProperties(uiProps, defaults);
adjustPlatformSpecifics(uiProps);
defaults.putAll(uiProps);
StyleSheet styleSheet = currentTheme.loadStyleSheet();
new HTMLEditorKit().setStyleSheet(styleSheet);
new HTMLEditorKit().setStyleSheet(currentTheme.loadStyleSheet());
}
private void initGlobals(final Theme currentTheme, final UIDefaults defaults, final Properties uiProps) {
PropertyLoader.putProperties(
PropertyLoader.loadProperties(DarkLaf.class, "globals", "properties/"), uiProps, defaults);
currentTheme.customizeGlobals(uiProps, defaults);
installGlobals(uiProps, defaults);
}
private void installGlobals(final Properties uiProps, final Map<Object, Object> defaults) {
@ -88,7 +106,30 @@ public class ThemeDefaultsInitTask implements DefaultsInitTask {
}
}
protected void adjustPlatformSpecifics(final Properties uiProps) {
private void initUIProperties(final Theme currentTheme, final UIDefaults defaults, final Properties uiProps) {
for (String property : UI_PROPERTIES) {
PropertyLoader.putProperties(
PropertyLoader.loadProperties(DarkLaf.class, property, "properties/ui/"), uiProps, defaults);
}
currentTheme.customizeUIProperties(uiProps, defaults);
}
private void initIconTheme(final Theme currentTheme, final UIDefaults defaults, final Properties uiProps) {
currentTheme.loadIconTheme(uiProps, defaults);
for (String property : ICON_PROPERTIES) {
PropertyLoader.putProperties(
PropertyLoader.loadProperties(DarkLaf.class, property, "properties/icons/"), uiProps, defaults);
}
currentTheme.customizeIconTheme(uiProps, defaults);
}
private void initPlatformProperties(final Theme currentTheme, final UIDefaults defaults, final Properties uiProps) {
PropertyLoader.putProperties(
PropertyLoader.loadProperties(DarkLaf.class, getOsName(), "properties/platform/"), uiProps, defaults);
currentTheme.customizePlatformProperties(uiProps, defaults);
}
private void adjustPlatformSpecifics(final Properties uiProps) {
boolean useScreenMenuBar = Boolean.getBoolean(MAC_OS_MENU_BAR_KEY);
// If user wants to use Apple menu bar, then we need to keep the default
// component for MenuBarUI and MenuUI
@ -96,4 +137,8 @@ public class ThemeDefaultsInitTask implements DefaultsInitTask {
uiProps.remove("MenuBarUI");
}
}
private String getOsName() {
return SystemInfo.isMac ? "mac" : SystemInfo.isWindows ? "windows" : "linux";
}
}

12
core/src/test/java/theme/MyCustomTheme.java

@ -34,8 +34,8 @@ import java.util.Properties;
public class MyCustomTheme extends Theme {
@Override
public void loadGlobals(final Properties properties, final UIDefaults currentDefaults) {
super.loadGlobals(properties, currentDefaults);
public void customizeGlobals(final Properties properties, final UIDefaults currentDefaults) {
super.customizeGlobals(properties, currentDefaults);
/*
* Properties in the globals file should have a 'globals.' to be applied globally.
*/
@ -43,8 +43,8 @@ public class MyCustomTheme extends Theme {
}
@Override
public void loadPlatformProperties(final Properties properties, final UIDefaults currentDefaults) {
super.loadPlatformProperties(properties, currentDefaults);
public void customizePlatformProperties(final Properties properties, final UIDefaults currentDefaults) {
super.customizePlatformProperties(properties, currentDefaults);
/*
* Loading this file (and having it present) is optional.
*/
@ -53,8 +53,8 @@ public class MyCustomTheme extends Theme {
}
@Override
public void loadUIProperties(final Properties properties, final UIDefaults currentDefaults) {
super.loadUIProperties(properties, currentDefaults);
public void customizeUIProperties(final Properties properties, final UIDefaults currentDefaults) {
super.customizeUIProperties(properties, currentDefaults);
/*
* Loading this file (and having it present) is optional.
*/

1
settings.gradle.kts

@ -18,6 +18,7 @@ include(
"dependencies-bom",
"native-utils",
"core",
"theme",
"property-loader",
"utils",
"platform-base",

7
theme/build.gradle.kts

@ -0,0 +1,7 @@
plugins {
`java-library`
}
dependencies {
implementation(project(":darklaf-property-loader"))
}

0
core/src/main/java/com/github/weisj/darklaf/theme/ColorToneRule.java → theme/src/main/java/com/github/weisj/darklaf/theme/ColorToneRule.java

0
core/src/main/java/com/github/weisj/darklaf/theme/ContrastRule.java → theme/src/main/java/com/github/weisj/darklaf/theme/ContrastRule.java

0
core/src/main/java/com/github/weisj/darklaf/theme/DarculaTheme.java → theme/src/main/java/com/github/weisj/darklaf/theme/DarculaTheme.java

0
core/src/main/java/com/github/weisj/darklaf/theme/DefaultThemeProvider.java → theme/src/main/java/com/github/weisj/darklaf/theme/DefaultThemeProvider.java

0
core/src/main/java/com/github/weisj/darklaf/theme/FontMapper.java → theme/src/main/java/com/github/weisj/darklaf/theme/FontMapper.java

6
core/src/main/java/com/github/weisj/darklaf/theme/FontSizeRule.java → theme/src/main/java/com/github/weisj/darklaf/theme/FontSizeRule.java

@ -34,18 +34,12 @@ public enum FontSizeRule {
HUGE("huge");
private final String propertyKey;
private final PropertyFontMapper fontMapper;
FontSizeRule(final String propertyKey) {
this.propertyKey = propertyKey;
fontMapper = new PropertyFontMapper(getPropertyKey());
}
public String getPropertyKey() {
return "fontSize." + propertyKey;
}
public FontMapper getFontMapper() {
return fontMapper;
}
}

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

@ -64,14 +64,14 @@ public class HighContrastDarkTheme extends Theme {
}
@Override
public void loadUIProperties(final Properties properties, final UIDefaults currentDefaults) {
super.loadUIProperties(properties, currentDefaults);
public void customizeUIProperties(final Properties properties, final UIDefaults currentDefaults) {
super.customizeUIProperties(properties, currentDefaults);
loadCustomProperties("ui", properties, currentDefaults);
}
@Override
public void loadPlatformProperties(final Properties properties, final UIDefaults currentDefaults) {
super.loadPlatformProperties(properties, currentDefaults);
public void customizePlatformProperties(final Properties properties, final UIDefaults currentDefaults) {
super.customizePlatformProperties(properties, currentDefaults);
loadCustomProperties("platform", properties, currentDefaults);
}
}

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

@ -64,14 +64,14 @@ public class HighContrastLightTheme extends Theme {
}
@Override
public void loadUIProperties(final Properties properties, final UIDefaults currentDefaults) {
super.loadUIProperties(properties, currentDefaults);
public void customizeUIProperties(final Properties properties, final UIDefaults currentDefaults) {
super.customizeUIProperties(properties, currentDefaults);
loadCustomProperties("ui", properties, currentDefaults);
}
@Override
public void loadPlatformProperties(final Properties properties, final UIDefaults currentDefaults) {
super.loadPlatformProperties(properties, currentDefaults);
public void customizePlatformProperties(final Properties properties, final UIDefaults currentDefaults) {
super.customizePlatformProperties(properties, currentDefaults);
loadCustomProperties("platform", properties, currentDefaults);
}
}

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

@ -62,8 +62,8 @@ public class IntelliJTheme extends Theme {
}
@Override
public void loadUIProperties(final Properties properties, final UIDefaults currentDefaults) {
super.loadUIProperties(properties, currentDefaults);
public void customizeUIProperties(final Properties properties, final UIDefaults currentDefaults) {
super.customizeUIProperties(properties, currentDefaults);
loadCustomProperties("ui", properties, currentDefaults);
}
}

0
core/src/main/java/com/github/weisj/darklaf/theme/PreferredThemeStyle.java → theme/src/main/java/com/github/weisj/darklaf/theme/PreferredThemeStyle.java

0
core/src/main/java/com/github/weisj/darklaf/theme/PresetIconRule.java → theme/src/main/java/com/github/weisj/darklaf/theme/PresetIconRule.java

4
core/src/main/java/com/github/weisj/darklaf/theme/SolarizedDarkTheme.java → theme/src/main/java/com/github/weisj/darklaf/theme/SolarizedDarkTheme.java

@ -54,8 +54,8 @@ public class SolarizedDarkTheme extends Theme {
}
@Override
public void loadUIProperties(final Properties properties, final UIDefaults currentDefaults) {
super.loadUIProperties(properties, currentDefaults);
public void customizeUIProperties(final Properties properties, final UIDefaults currentDefaults) {
super.customizeUIProperties(properties, currentDefaults);
loadCustomProperties("ui", properties, currentDefaults);
}

4
core/src/main/java/com/github/weisj/darklaf/theme/SolarizedLightTheme.java → theme/src/main/java/com/github/weisj/darklaf/theme/SolarizedLightTheme.java

@ -54,8 +54,8 @@ public class SolarizedLightTheme extends Theme {
}
@Override
public void loadUIProperties(final Properties properties, final UIDefaults currentDefaults) {
super.loadUIProperties(properties, currentDefaults);
public void customizeUIProperties(final Properties properties, final UIDefaults currentDefaults) {
super.customizeUIProperties(properties, currentDefaults);
loadCustomProperties("ui", properties, currentDefaults);
}

53
core/src/main/java/com/github/weisj/darklaf/theme/Theme.java → theme/src/main/java/com/github/weisj/darklaf/theme/Theme.java

@ -23,9 +23,7 @@
*/
package com.github.weisj.darklaf.theme;
import com.github.weisj.darklaf.DarkLaf;
import com.github.weisj.darklaf.PropertyLoader;
import com.github.weisj.darklaf.util.SystemInfo;
import javax.swing.*;
import javax.swing.text.html.StyleSheet;
@ -39,22 +37,10 @@ import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Theme for {@link DarkLaf}.
*
* @author Jannis Weis
*/
public abstract class Theme {
private static final Logger LOGGER = Logger.getLogger(Theme.class.getName());
private static final String[] UI_PROPERTIES = new String[]{
"borders", "button", "checkBox", "colorChooser", "comboBox", "fileChooser", "tristate",
"internalFrame", "label", "list", "menu", "menuBar", "menuItem", "numberingPane", "optionPane", "panel",
"popupMenu", "progressBar", "radioButton", "rootPane", "scrollBar", "scrollPane", "separator",
"slider", "spinner", "splitPane", "statusBar", "tabbedPane", "tabFrame", "table", "taskPane", "text",
"toggleButton", "toolBar", "toolTip", "tree",
};
private static final String[] ICON_PROPERTIES = new String[]{
"control", "dialog", "files", "frame", "indicator", "menu", "misc", "navigation"
};
private FontSizeRule fontSizeRule;
@ -96,7 +82,7 @@ public abstract class Theme {
}
/**
* Load the global values.
* Customize the global values.
* <p>
* Note: When overwriting a theme you also have overwrite {@link #getLoaderClass()} to return the class of the theme
* you are overwriting. In this case you should use {@link #loadWithClass(String, Class)} instead of {@link
@ -105,13 +91,11 @@ public abstract class Theme {
* @param properties the properties to load the values into.
* @param currentDefaults the current ui defaults.
*/
public void loadGlobals(final Properties properties, final UIDefaults currentDefaults) {
PropertyLoader.putProperties(PropertyLoader.loadProperties(DarkLaf.class, "globals", "properties/"),
properties, currentDefaults);
public void customizeGlobals(final Properties properties, final UIDefaults currentDefaults) {
}
/**
* Load the icon defaults.
* Customize the icon defaults.
* <p>
* Note: When overwriting a theme you also have overwrite {@link #getLoaderClass()} to return the class of the theme
* you are overwriting. In this case you should use {@link #loadWithClass(String, Class)} instead of {@link
@ -120,12 +104,7 @@ public abstract class Theme {
* @param properties the properties to load the value into.
* @param currentDefaults the current ui defaults.
*/
public void loadIconProperties(final Properties properties, final UIDefaults currentDefaults) {
loadIconTheme(properties, currentDefaults);
for (String property : ICON_PROPERTIES) {
PropertyLoader.putProperties(PropertyLoader.loadProperties(DarkLaf.class, property, "properties/icons/"),
properties, currentDefaults);
}
public void customizeIconTheme(final Properties properties, final UIDefaults currentDefaults) {
}
/**
@ -138,15 +117,15 @@ public abstract class Theme {
* @param properties the properties to load the value into.
* @param currentDefaults the current ui defaults.
*/
protected void loadIconTheme(final Properties properties, final UIDefaults currentDefaults) {
public void loadIconTheme(final Properties properties, final UIDefaults currentDefaults) {
PresetIconRule iconTheme = getPresetIconRule();
Properties props;
switch (iconTheme) {
case DARK:
props = PropertyLoader.loadProperties(DarkLaf.class, "dark_icons", "properties/icons/presets/");
props = PropertyLoader.loadProperties(Theme.class, "dark_icons", "icon_presets/");
break;
case LIGHT:
props = PropertyLoader.loadProperties(DarkLaf.class, "light_icons", "properties/icons/presets/");
props = PropertyLoader.loadProperties(Theme.class, "light_icons", "icon_presets/");
break;
case NONE:
default:
@ -156,7 +135,7 @@ public abstract class Theme {
}
/**
* Load the platform defaults.
* Customize the platform defaults.
* <p>
* Note: When overwriting a theme you should use {@link #loadWithClass(String, Class)} instead of {@link
* #load(String)}.
@ -164,17 +143,11 @@ public abstract class Theme {
* @param properties the properties to load the values into.
* @param currentDefaults the current ui defaults.
*/
public void loadPlatformProperties(final Properties properties, final UIDefaults currentDefaults) {
PropertyLoader.putProperties(PropertyLoader.loadProperties(DarkLaf.class, getOsName(), "properties/platform/"),
properties, currentDefaults);
}
private String getOsName() {
return SystemInfo.isMac ? "mac" : SystemInfo.isWindows ? "windows" : "linux";
public void customizePlatformProperties(final Properties properties, final UIDefaults currentDefaults) {
}
/**
* Load the ui defaults.
* Customize the ui defaults.
* <p>
* Note: When overwriting a theme you should use {@link #loadWithClass(String, Class)} instead of {@link
* #load(String)}.
@ -182,11 +155,7 @@ public abstract class Theme {
* @param properties the properties to load the values into.
* @param currentDefaults the current ui defaults.
*/
public void loadUIProperties(final Properties properties, final UIDefaults currentDefaults) {
for (String property : UI_PROPERTIES) {
PropertyLoader.putProperties(PropertyLoader.loadProperties(DarkLaf.class, property, "properties/ui/"),
properties, currentDefaults);
}
public void customizeUIProperties(final Properties properties, final UIDefaults currentDefaults) {
}
/**

0
core/src/main/java/com/github/weisj/darklaf/theme/ThemeProvider.java → theme/src/main/java/com/github/weisj/darklaf/theme/ThemeProvider.java

0
core/src/main/java/com/github/weisj/darklaf/theme/UnsupportedThemeException.java → theme/src/main/java/com/github/weisj/darklaf/theme/UnsupportedThemeException.java

0
core/src/main/resources/com/github/weisj/darklaf/theme/darcula/darcula_defaults.properties → theme/src/main/resources/com/github/weisj/darklaf/theme/darcula/darcula_defaults.properties

0
core/src/main/resources/com/github/weisj/darklaf/theme/darcula/darcula_styleSheet.css → theme/src/main/resources/com/github/weisj/darklaf/theme/darcula/darcula_styleSheet.css

0
core/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_dark/high_contrast_dark_defaults.properties → theme/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_dark/high_contrast_dark_defaults.properties

0
core/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_dark/high_contrast_dark_icons.properties → theme/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_dark/high_contrast_dark_icons.properties

0
core/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_dark/high_contrast_dark_platform.properties → theme/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_dark/high_contrast_dark_platform.properties

0
core/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_dark/high_contrast_dark_styleSheet.css → theme/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_dark/high_contrast_dark_styleSheet.css

0
core/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_dark/high_contrast_dark_ui.properties → theme/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_dark/high_contrast_dark_ui.properties

0
core/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_light/high_contrast_light_defaults.properties → theme/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_light/high_contrast_light_defaults.properties

0
core/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_light/high_contrast_light_icons.properties → theme/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_light/high_contrast_light_icons.properties

0
core/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_light/high_contrast_light_platform.properties → theme/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_light/high_contrast_light_platform.properties

0
core/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_light/high_contrast_light_styleSheet.css → theme/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_light/high_contrast_light_styleSheet.css

0
core/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_light/high_contrast_light_ui.properties → theme/src/main/resources/com/github/weisj/darklaf/theme/high_contrast_light/high_contrast_light_ui.properties

0
core/src/main/resources/com/github/weisj/darklaf/properties/icons/presets/dark_icons.properties → theme/src/main/resources/com/github/weisj/darklaf/theme/icon_presets/dark_icons.properties

0
core/src/main/resources/com/github/weisj/darklaf/properties/icons/presets/light_icons.properties → theme/src/main/resources/com/github/weisj/darklaf/theme/icon_presets/light_icons.properties

0
core/src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_defaults.properties → theme/src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_defaults.properties

0
core/src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_styleSheet.css → theme/src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_styleSheet.css

0
core/src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_ui.properties → theme/src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_ui.properties

0
core/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_defaults.properties → theme/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_defaults.properties

0
core/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_icons.properties → theme/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_icons.properties

0
core/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_styleSheet.css → theme/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_styleSheet.css

0
core/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_ui.properties → theme/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_ui.properties

0
core/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_defaults.properties → theme/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_defaults.properties

0
core/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_icons.properties → theme/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_icons.properties

0
core/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_styleSheet.css → theme/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_styleSheet.css

0
core/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_ui.properties → theme/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_ui.properties

Loading…
Cancel
Save