Skip to content

Commit

Permalink
[#344] Fire change when opacity has changed
Browse files Browse the repository at this point in the history
  • Loading branch information
SiboVG authored and weisJ committed Nov 14, 2023
1 parent 347182c commit 1e65bac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,9 @@ public double getOpacity() {
return opacity;
}

public void setOpacity(final double opacity) {
public void setOpacity(final Object source, final double opacity) {
this.opacity = opacity;
fireColorChanged(source);
}

public int[] getValuesForModel(final DarkColorModel model) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public ColorWheelPanel(final boolean enableOpacity, final boolean opacityInPerce
opacitySlider.setToolTipText("Opacity");
opacitySlider.setUnits(opacityInPercent ? SlideComponent.Unit.PERCENT : SlideComponent.Unit.LEVEL);
opacitySlider.addListener(integer -> {
colorWheel.setOpacity(integer / 255.0);
colorWheel.setOpacity(opacitySlider, integer / 255.0);
ColorWheelPanel.this.repaint();
});
add(opacitySlider, BorderLayout.SOUTH);
Expand Down

0 comments on commit 1e65bac

Please sign in to comment.