Store icons with correct devicePixelRatio
Needs RevisionPublic

Authored by abrahams on Jun 30 2018, 4:33 AM.

Details

Reviewers
cfeck
broulik
ngraham
Group Reviewers
Dolphin
Summary

Fixes a visual glitch with badge scaling on high DPI screens

Also use qreal api for dpr in a few places

Diff Detail

Repository
R318 Dolphin
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 478
Build 478: arc lint + arc unit
abrahams created this revision.Jun 30 2018, 4:33 AM
Restricted Application added a project: Dolphin. · View Herald TranscriptJun 30 2018, 4:33 AM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
abrahams requested review of this revision.Jun 30 2018, 4:33 AM
ngraham added a subscriber: ngraham.

Thanks for the patch! Conceptually, this makes sense to me. Can you attach some before-and-after screenshots showing the impact of the change?

Does this fix any Bugzilla tickets?

src/kitemviews/kfileitemmodelrolesupdater.cpp
555

Should this also use devicePixelRatioF()?

cfeck added inline comments.Aug 15 2018, 3:19 PM
src/kitemviews/kfileitemmodelrolesupdater.cpp
555

QGuiApplication::devicePixelRatio() already returns qreal.

ngraham requested changes to this revision.Aug 26 2018, 3:16 AM

I've tested this patch and it seems to affect emblem scaling for non-integer HiDPI scale factors. However the behavior is inconsistent: for example the degree of emblem scaling differs between folders in my home directory and the items in the network browser (remote:/). This can be seen most clearly when using Icons View and making the icons as big as possible.

@abrahams, can you clarify what issues this patch fixes and how it can be tested?

This revision now requires changes to proceed.Aug 26 2018, 3:16 AM