darklaf
darklaf copied to clipboard
[Bug] Wrong IconButton positioning in v3.0.3
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
Additional Information:
- OS: macOS
- OS Version: 13.4.1
- For issues with frame decorations on Windows please provide the explicit Windows build number.
- 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.
-
Note: If you are using the
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");
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.