darklaf icon indicating copy to clipboard operation
darklaf copied to clipboard

[Bug] Wrong IconButton positioning in v3.0.3

Open SiboVG opened this issue 1 year ago • 2 comments

Describe the bug When using the latest snapshot of darklaf, v3.0.3, the positioning of some of my buttons has become messed up. I've been able to trace the issue down to commit 45679f69adf5bbb1901425d41806a8de96dc35db.

To Reproduce Issue is happening for the following widgets:

String[] SCALE_LABELS = ...;
JButton zoomOutButton = new JButton(Icons.ZOOM_OUT);
JComboBox scaleSelectorCombo = new JComboBox<>(SCALE_LABELS);
scaleSelectorCombo.setEditable(true);
JButton zoomInButton = new JButton(Icons.ZOOM_IN);

Screenshots Screenshot 2023-07-16 at 13 13 16

Additional Information:

  • OS: macOS
  • OS Version: 13.4.1
  • Darklaf Version: 3.0.3-SNAPSHOT
    • Note: If you are using the latest.integration version please try to replicate the issue with the latest stable release.

SiboVG avatar Jul 16 '23 22:07 SiboVG

UPDATE: I'm able to resolve this issue when I remove the 20 offset from the shadowSize in core/src/main/java/com/github/weisj/darklaf/ui/button/DarkButtonBorder.java

// This causes an issue
shadowSize = UIManager.getInt("Button.shadowHeight") + 20;

// This works!
shadowSize = UIManager.getInt("Button.shadowHeight");

SiboVG avatar Jul 16 '23 22:07 SiboVG

Yes that are some left over debugging remains. I have already fixed it locally but didn’t push the changes yet due to some unfinished other changes.

weisJ avatar Jul 19 '23 14:07 weisJ