Skip to content

[KIconDialog] Render SVGs with proper devicePixelRatio

Kai Uwe Broulik requested to merge work/kbroulik/icondialog-crisp-svg into master

SVGs can scale indefinitely, so render them crisply.

Also move all the resizing and padding into the non-SVG code path since for SVG we create the QImage ourselves so it will always have the correct dimentions, making the code easier to follow.


Verified that SVGs are rendered crisp and that PNGs are unchanged.

I don't understand why without specifying bounds on QSvgRenderer::paint the pixmap is rendered too big (i.e. I only see a quarter, as if QSvgRenderer didn't do high dpi properly...)

@davidedmundson @cfeck @cullmann

Before

Screenshot_20210624_173341

After

Screenshot_20210624_173424

Merge request reports