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

Improve on Window resizing #866

Open
CodingFuchs opened this issue Jul 6, 2024 · 1 comment
Open

Improve on Window resizing #866

CodingFuchs opened this issue Jul 6, 2024 · 1 comment

Comments

@CodingFuchs
Copy link

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:

  • On Windows 10 the contents are only resized after ending the mouse movement
  • On Ubuntu 24.04 the text appears to be jittering, while resizing
  • On Ubuntu 24.04 the background in the "not painted yet" area does not match the theme color
  • On Ubuntu 24.04 the whole area of the window seems to occasionally have a complete black frame

This leads to following questions:

  • Is it possible/desirable to have the same resize behavior on all operating systems? Would that mean making it on Windows 10/11 more responsible? Or maybe fix the problems on Ubuntu by making it behave like it does on Windows?
  • Can the resizing issues on Ubuntu be addressed by the Look and Feel? Or is the problem rooted in the JVM?

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

  • The background in the "not yet painted" area, is white and sometimes black.

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

  • The texts seem to jitter or change size, while resizing.
  • The background in the "not yet painted" area, has another color, than the FlatLaf Theme, but in this case it seems to be neither black and white but the gray tone, which would be great for the FlatDark theme.
  • Very rarely but still noticeable, the complete area of the window renders black for a frame.

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
Copy link

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. 👍

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

2 participants