Browse Source

Add convenience method to strip accent colors and font size from a theme.

pull/222/head
weisj 4 years ago
parent
commit
6170f72a3e
  1. 4
      theme/src/main/java/com/github/weisj/darklaf/theme/Theme.java

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

@ -52,6 +52,10 @@ public abstract class Theme implements Comparable<Theme>, Comparator<Theme> {
this.accentColorRule = accentColorRule != null ? accentColorRule : AccentColorRule.getDefault(); this.accentColorRule = accentColorRule != null ? accentColorRule : AccentColorRule.getDefault();
} }
public static Theme baseThemeOf(final Theme theme) {
return theme.derive(FontSizeRule.getDefault(), AccentColorRule.getDefault());
}
/** /**
* Create a derived theme with the given display name. * Create a derived theme with the given display name.
* *

Loading…
Cancel
Save