[Differential] [Commented On] D2810: Fixed loading of the wallpapers in the activity switcher

davidedmundson (David Edmundson) noreply at phabricator.kde.org
Mon Sep 19 11:29:38 UTC 2016


davidedmundson added inline comments.

INLINE COMMENTS

> switcherbackend.cpp:161
> +
> +            if (width <= 0) {
> +                width = 320;

"The requestedSize corresponds to the Image::sourceSize requested by an Image item. If requestedSize is a valid size, the image returned should be of that size."

source size isn't set which puts you always in this path

> switcherbackend.cpp:181
> +                KIO::filePreview(list, QSize(width, height));
> +            job->setScaleType(KIO::PreviewJob::Scaled);
> +            job->setIgnoreMaximumSize(true);

why not ScaledAndCached?

> switcherbackend.cpp:191
> +                        if (m_requestedSize.isValid()) {
> +                            image = image.scaled(m_requestedSize);
> +                        }

is this needed?

1. KIO is set to scaled anyway, so will resize it.
2. the QML code can resize the image at an openGL level by setting an appropriate fillMode.

The above two will keep aspect ratio properly.

REPOSITORY
  rPLASMADESKTOP Plasma Desktop

BRANCH
  Plasma/5.8

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: ivan, #plasma, davidedmundson, mart
Cc: plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160919/037efe5c/attachment.html>


More information about the Plasma-devel mailing list