JFormDesigner / FlatLaf

FlatLaf - Swing Look and Feel (with Darcula/IntelliJ themes support)
https://www.formdev.com/flatlaf/
Apache License 2.0
3.42k stars 272 forks source link

minor windows maximized jFrame issues at 125% scale #904

Closed Frank-99 closed 1 day ago

Frank-99 commented 3 weeks ago

Very minor detail, but I noticed that when a JFrame is maximized the minimize, maximize and close buttons are shifted to the left and they leave a 1px gap to the right: image instead of a normal window, i.e. Chrome: image

this on Windows 11 with 125% scale and if I put the display to 100% scale the issue is gone.

Another very minor issue is that If I have the window maximized when the screen is 100%: image When I then change it to 125% it doesn't rescale the content of the JFrame properly and the rest just goes off-screen: image to fix it I have to drag the window and re-maximize it: image

Again, these are very minor issues and are in no way detrimental to the usability of the apps, but I wanted to make them known just in case that they might get fixed in future updates 😺

Thank you again for all the amazing support!

DevCharly commented 2 weeks ago

Regarding 1px gap right to close button

Seems that there is some clipping applied. If I enable FlatInspector it is also cut off:

image

BTW the tooltip is not affected because this is a different Win32 window. A heavy-weight popup.

When using Nimbus L&F, with system window title bar, I see the same gap:

image

Even Windows Explorer has this gap:

image

So lets ignore this glitch...

Regarding problem when changing display scaling

This seems to be a bug in FlatLaf window decoratoins. Neither the FlatLaf title bar, nor the window content is updated when changing display scaling.

With disabled FlatLaf window decorations, title bar and window content is updated correctly.

DevCharly commented 3 days ago

Regarding problem when changing display scaling

When changing screen scaling and the JFrame is maximized, then the Java internal frame bounds are not updated.

Screenshot show frame after changing scaling from 125% to 100% with active FlatInspector. The highlighted "red" area is the actual Java frame/component size. The screen resolution is 1152 x 864. Red arrow points to too small frame size.

grafik

Noticed that this problem does not exist in current JetBrains JREs.

Found out that they fixed it in jbr-release-17.0.8.1b1059.3 with commit https://github.com/JetBrains/JetBrainsRuntime/commit/79720017c04ec55053ea66f5a36c106606b3127a (JBR-5259) and https://github.com/JetBrains/JetBrainsRuntime/commit/7cd718805893baa272470f74c5c9a8daf5fc0ff3 (JBR-7128)

DevCharly commented 1 day ago

Fixed in latest 3.5.3-SNAPSHOT: https://github.com/JFormDesigner/FlatLaf#snapshots