Fix app icon button in window decos with high DPI in previews.
ClosedPublic

Authored by davidedmundson on Jul 17 2017, 10:22 PM.

Details

Summary

With both Qt devicePixelRatio > 1 and Qt::AA_UseHighDpiPixmaps set
QIcon.pixmap() will return a bigger image than the size requested, with
the relevant devicePixelRatio set.

This code is trying to center an icon within a bounding rect, (like
QStyle::drawItemPixmap) and so positioning should use normalised pixels,
not actual pixmap pixels.

This affected Systemsettings previews but not kwin.

Diff Detail

Repository
R31 Breeze
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Restricted Application added a project: Plasma. · View Herald TranscriptJul 17 2017, 10:22 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart accepted this revision.Jul 18 2017, 11:06 AM
mart added a subscriber: mart.
mart added inline comments.
kdecoration/breezebutton.cpp
140

couldn't also need a check that the resulting ratio is at least 1 or more?

This revision is now accepted and ready to land.Jul 18 2017, 11:06 AM
This revision was automatically updated to reflect the committed changes.