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

ScrollPane border paint problem at large scalings #743

Closed
tristanzhou opened this issue Oct 5, 2023 · 3 comments
Closed

ScrollPane border paint problem at large scalings #743

tristanzhou opened this issue Oct 5, 2023 · 3 comments
Milestone

Comments

@tristanzhou
Copy link

I've seen the four sides of a ScrollPane border painted with different thicknesses at large scalings: 125% ~ 175%.
Any idea that we can work around this?

scrollpane borders

@DevCharly
Copy link
Collaborator

I've seen the four sides of a ScrollPane border painted with different thicknesses at large scalings: 125% ~ 175%.

This is because Swing scales the 1px border either to one or to two screen pixels.

Any idea that we can work around this?

Not really...

@eirikbakke
Copy link
Contributor

I use a special Border implementation that avoids this problem (e.g. on 150% scaling on Windows). Feel very free to adopt it into FlatLAF; the source code is already in the NetBeans IDE repo under the Apache license:

https://github.com/apache/netbeans/blob/master/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/DPISafeBorder.java

DevCharly added a commit that referenced this issue Jun 14, 2024
@DevCharly
Copy link
Collaborator

Fixed in latest 3.5-SNAPSHOT: https://github.com/JFormDesigner/

The scrollpane border now has same thickness on all 4 sides.

@DevCharly DevCharly added this to the 3.5 milestone Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants