D11064: add preview images to fonts kcm

David Edmundson noreply at phabricator.kde.org
Mon Mar 5 22:07:37 UTC 2018


davidedmundson requested changes to this revision.
davidedmundson added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> main.qml:187
> +                        transform: Scale {
> +                            xScale: 1. / QtWindow.Screen.devicePixelRatio;
> +                            yScale: 1. / QtWindow.Screen.devicePixelRatio;

We dont' need these transforms.
There shouldn't be any high DPI specicfic code in QML.

> previewrenderengine.cpp:136
> +    
> +    return draw(name, style, faceNo, txt, bgnd, fSize, text);
> +}

change to

QImage image(draw(name, style,...));
image.setDevicePixelRatio(ratio);
return image;

This keeps the metadata of the image scaling with the image, and then the Image item knows automatically what the logical of this image is.

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D11064

To: progwolff, #plasma, harmathy, mart, davidedmundson
Cc: davidedmundson, abetts, broulik, plasma-devel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180305/afd931e0/attachment-0001.html>


More information about the Plasma-devel mailing list