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

many images not rendered at retina resolution on macOS #12361

Closed
m0dB opened this issue Nov 26, 2023 · 5 comments
Closed

many images not rendered at retina resolution on macOS #12361

m0dB opened this issue Nov 26, 2023 · 5 comments

Comments

@m0dB
Copy link
Contributor

m0dB commented Nov 26, 2023

Bug Description

On macOS retina, many images are not rendered at HDPI. I always noticed this with the rec button, the on air icon, the settings button, and the MIXXX logo, but on closer inspection, it affects many more icons.

This can be clearly observed in this zoomed screenshot composition: the pixels of the images are double the size of the pixels of the text, which is rendered correctly. Note that the images are all svgs.

Screenshot 2023-11-26 at 13 44 21

Version

2.4.0

OS

macOS

@m0dB m0dB added the bug label Nov 26, 2023
@JoergAtGithub JoergAtGithub added this to the 2.4.0 milestone Nov 26, 2023
@JoergAtGithub
Copy link
Member

I set the HIDPI /Retina scaling to 400% on Windows and everything looks fine:
grafik

Are you sure that HIDPI is the reason and not macOS?

@m0dB
Copy link
Contributor Author

m0dB commented Nov 26, 2023

Yeah that looks nice...

I think this scaling is done differently on macOS than on windows, and it looks like a Qt bug to me.

If you log the devicePixelRatio() in a widget, what value does that give you? 1? or 4?

I have tried to find a solution programmatically, but even if I render the style into a pixmap with a devicePixelRatio of 2, the svg is rendered at low res.

I think this is related:

"This pixmap generation happens in a QIconEngine. The default engine scales pixmaps down if required, but never up"

And indeed, if I change the document size of for example the settings icon from
<svg width="76" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
to
<svg width="152" height="32" version="1.1" xmlns="http://www.w3.org/2000/svg">

and scale the contents, it looks good.

Screenshot 2023-11-26 at 15 41 21

@m0dB m0dB changed the title some images not rendered at hdpi many images not rendered at retina resolution on macOS Nov 26, 2023
@m0dB
Copy link
Contributor Author

m0dB commented Nov 26, 2023

@JoergAtGithub I created a PR with upscaled svgs. Could you check if this has any drawbacks on windows?

@ronso0 ronso0 linked a pull request Dec 4, 2023 that will close this issue
@m0dB m0dB mentioned this issue Dec 8, 2023
@ronso0
Copy link
Member

ronso0 commented Dec 10, 2023

Fixed in LateNight by #12407

@m0dB m0dB closed this as completed Jan 2, 2024
@ronso0
Copy link
Member

ronso0 commented Jan 2, 2024

@m0dB This was only fixed for LateNight, what about the other skins?

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

Successfully merging a pull request may close this issue.

3 participants