JFormDesigner / FlatLaf

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

Improve on Window resizing #866

Open CodingFuchs opened 2 months ago

CodingFuchs commented 2 months ago

Hello,

I really like this Look and Feel!

One area, which might could be improved upon, is the resizing behavior of windows.

Let's first sum up the observations, that can be made:

This leads to following questions:

On Ubuntu the resizing has no "delay". While on Windows (10 at least) it seems, that the mouse needs to stop moving, before the contents inside will be resized.

Resizing on Windows: https://github.com/JFormDesigner/FlatLaf/assets/84087666/b6285d91-cc29-4f2d-9fed-ad59325478ea Note how the resizing takes place only after finishing the mouse movements.

Resizing on Ubuntu (FlatDark Theme) https://github.com/JFormDesigner/FlatLaf/assets/84087666/08bf7d54-337b-4a8d-b740-1d98ca2b4e4a

Resizing on Ubuntu (FlatLight Theme) https://github.com/JFormDesigner/FlatLaf/assets/84087666/bfa15a01-edcb-4aaa-8ad9-a501a2ea16d1 Note:

Resizing on Ubuntu (Metal) https://github.com/JFormDesigner/FlatLaf/assets/84087666/1c071690-9a43-40c0-a3a3-28597e55913b I also looked at the resizing behavior with good old metal look, which is even more laggy. So maybe it is a combination of Java + Operating System which cannot be addressed by the Look and Feel?

poce1don commented 2 months ago

This is a characteristic behavior of Swing, I have always observed this in Swing applications, from the most basic to the most complex layouts. Applications written with JavaFX, this does not happen, the graphical capabilities have been improved.

Do this same test on your videos with a JavaFX application and you will see that nothing like this happens. :+1: