Prefer QIcon::pixmap(QWindow*, ...) overload
ClosedPublic

Authored by apol on Apr 22 2020, 4:01 PM.

Details

Summary

It takes into account the dpi of the screen we're rendering to.
Other overloads assume the window is nullptr and will use the primary screen's dpi which can change almost randomly.

Test Plan

Icons still look fine even if I drag windows from a screen to another.

Diff Detail

Repository
R242 Plasma Framework (Library)
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 25707
Build 25725: arc lint + arc unit
apol created this revision.Apr 22 2020, 4:01 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptApr 22 2020, 4:01 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
apol requested review of this revision.Apr 22 2020, 4:01 PM
davidedmundson accepted this revision.Apr 22 2020, 8:36 PM
davidedmundson added a subscriber: davidedmundson.

Yeah, size is in logical pixels. Multiplying doesn't make sense.

I'm sure more high DPI bugs are caused by clients trying to be clever.

This revision is now accepted and ready to land.Apr 22 2020, 8:36 PM
This revision was automatically updated to reflect the committed changes.