Skip to content

Commit

Permalink
Make togglebutton hints depend on contrast property of theme.
Browse files Browse the repository at this point in the history
  • Loading branch information
weisJ committed Feb 6, 2021
1 parent fe1ba8c commit b152520
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ ToggleButton.inactiveFillColor = %widgetFill
ToggleButton.activeFillColor = %textForegroundInactive

ToggleButton.sliderSize = 35,17
ToggleButton.showSliderHints = false
ToggleButton.showSliderHints = %Theme.highContrast
ToggleButton.animated = true
10 changes: 6 additions & 4 deletions core/src/test/java/theme/ThemeEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,12 @@ public void customizeIconTheme(final Properties properties, final UIDefaults cur

apply.addActionListener(e -> {
mutableTheme.setDelegate(baseTheme.get());
mutableTheme.colorToneRule =
darkToggle.isSelected() ? ColorToneRule.DARK : ColorToneRule.LIGHT;
mutableTheme.contrastRule =
contrastToggle.isSelected() ? ContrastRule.HIGH_CONTRAST : ContrastRule.STANDARD;
mutableTheme.colorToneRule = darkToggle.isSelected()
? ColorToneRule.DARK
: ColorToneRule.LIGHT;
mutableTheme.contrastRule = contrastToggle.isSelected()
? ContrastRule.HIGH_CONTRAST
: ContrastRule.STANDARD;
LafManager.setTheme((Theme) null);
LafManager.install(mutableTheme);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ TabbedPane.selectedHoverBackground = %backgroundHover
ToolTip.paintShadow = false
RootPane.borderInsets = 1,1,1,1
ScrollBar.thumbAlpha = 100
ToggleButton.showSliderHints = true
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@ TabFrameTab.selectedForeground = %textSelectionForeground
TabFrameTab.hoverForeground = %textSelectionForeground
RootPane.borderInsets = 1,1,1,1
ScrollBar.thumbAlpha = 100
ToggleButton.showSliderHints = true

0 comments on commit b152520

Please sign in to comment.