Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Wrong IconButton positioning in v3.0.3 #347

Open
SiboVG opened this issue Jul 16, 2023 · 2 comments
Open

[Bug] Wrong IconButton positioning in v3.0.3 #347

SiboVG opened this issue Jul 16, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@SiboVG
Copy link
Contributor

SiboVG commented Jul 16, 2023

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 45679f6.

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 SiboVG added the bug Something isn't working label Jul 16, 2023
@SiboVG
Copy link
Contributor Author

SiboVG commented Jul 16, 2023

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 added a commit to SiboVG/openrocket that referenced this issue Jul 16, 2023
This is from a custom build of darklaf where I removed the 20 offset from shadowSize (see weisJ/darklaf#347)
@weisJ
Copy link
Owner

weisJ commented Jul 19, 2023

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.

SiboVG added a commit to SiboVG/darklaf that referenced this issue Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants