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

Make UMS fully DPI aware #4437

Closed
SurfaceS opened this issue Jan 26, 2024 · 4 comments
Closed

Make UMS fully DPI aware #4437

SurfaceS opened this issue Jan 26, 2024 · 4 comments

Comments

@SurfaceS
Copy link
Contributor

Since Java9, Java take care of HDPI, by resizing fonts and images to keep the size ratio.
As fonts are dynamics, it handle it well.
For images, it will need a MultiResolutionImage with the main image that have the requested normal size (say16x16), and other images that have HDPI sizes (32x32 for a 200% dpi and so on).
For now, the 16x16 is just resized to 32x32 for 200%, ending in a blurry image, and even more blurry when the scale factor is 125% for example.

Now that I implemented SvgMultiResolutionImage that give a well sized image on demand, it can be easy to have a fully HDPI aware java GUI.

We just need to change PNG GUI images to SVG (Scalable Vector Graphics) one, that are scalable by essence.

It will also solve this : * @todo choose better icons for these.

@SurfaceS
Copy link
Contributor Author

SurfaceS commented Feb 1, 2024

  • @todo choose better icons for these.
    On V14 (with HDPI) I added this icons :
    Connecting : image
    Connected : image
    Disconnected : image

@SurfaceS
Copy link
Contributor Author

SurfaceS commented Feb 4, 2024

This can be checked in the last v14.
Now, only the icons from java itself are not DPI aware (JFileChooser and MetalIconFactory ones).

The other ones are renderers images on resources/images/clients. I'll look into it as it need to be adapted/checked to work on both GUI (react as well).

@SurfaceS
Copy link
Contributor Author

The other ones are renderers images on resources/images/clients. I'll look into it as it need to be adapted/checked to work on both GUI (react as well).

renderers images on resources/images/clients is working well with SVG in v14 (like firefox or safari images) and is well scaled in java GUI and react GUI even in HDPI.

A note according to the readme :
The height is 128 pixels.
The width does not exceed 300 pixels.
There is a 10 pixel margin on the left and right sides of the photo.

I see that some renderers images are not compliant with that.
example : Caliber-HPG336DAB is 150x150, Sony-NetworkSpeaker 120x119, and so on.

@SurfaceS
Copy link
Contributor Author

done in v14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant