Port custom image mode to IconItem.
ClosedPublic

Authored by hein on Mar 23 2017, 9:28 PM.

Details

Summary

Simplifies compact representation to always using IconItem, now
that IconItem supports displaying non-square image sources.

Fixes missing hover highlight effect for custom image launcher
buttons.
BUG:377652

Depends on D5160 in plasma-framework to work correctly, enabling
it to learn image source aspect ratio from the IconItem's implicit
size.

A good follow-up would be aligning Kickoff and Kicker compact
representation sizing behavior and config UI now.

Diff Detail

Repository
R119 Plasma Desktop
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
hein created this revision.Mar 23 2017, 9:28 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 23 2017, 9:28 PM
apol added a subscriber: apol.Mar 23 2017, 11:21 PM
apol added inline comments.
applets/kicker/package/contents/ui/CompactRepresentation.qml
30

I've read several times that it's more efficient to check empty strings by doing something.length != 0.

I don't have data, but it kind of makes sense.

hein updated this revision to Diff 12764.Mar 24 2017, 12:42 PM

Use speed trick suggested by apol.

mart accepted this revision.Mar 24 2017, 1:57 PM
This revision is now accepted and ready to land.Mar 24 2017, 1:57 PM
This revision was automatically updated to reflect the committed changes.