[Folder view] Fix binding loop on width
ClosedPublic

Authored by ngraham on Feb 9 2020, 3:22 AM.

Details

Summary

This fixes the binding loop and replaces a complicated bit of code with something much
simpler.

Test Plan

No more binding loop warning when running plasmashell on the CLI

No meaningful difference in appearance for every combination of icon size and label
width in icon view

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ngraham created this revision.Feb 9 2020, 3:22 AM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 9 2020, 3:22 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.Feb 9 2020, 3:22 AM
gvgeo added a subscriber: gvgeo.Feb 9 2020, 2:32 PM

This removes the smallSpacing. Text will touch the edges.

ngraham updated this revision to Diff 75427.Feb 11 2020, 3:32 AM

Re-add margins, and also add missing bottomMargin

gvgeo added a comment.EditedFeb 11 2020, 6:49 AM

Also adds smallSpacing at the top. It would not look right with Plasma Components Label, which already has empty space top and bottom (paintedHeight*1.6). PC3 on the other hand has none... Correction, is set below "height: undefined". Tested and looks fine, height didn't change.

davidedmundson accepted this revision.Feb 11 2020, 8:01 AM
davidedmundson added a subscriber: davidedmundson.

It's technically different to before. The old code had half a small margin each side.

Generally speaking bug fixes shouldn't change things, as then you're mixing different types of task.

This revision is now accepted and ready to land.Feb 11 2020, 8:01 AM
ngraham updated this revision to Diff 75469.Feb 11 2020, 2:39 PM

Use identical margins; don't change the visuals at all (should be done in another patch if necessary)

ngraham updated this revision to Diff 75470.Feb 11 2020, 2:42 PM

One more

This revision was automatically updated to reflect the committed changes.
gvgeo added a comment.EditedFeb 20 2020, 9:35 PM

I logged with my main account and I get lots of
file:///code/kde/usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/FolderItemDelegate.qml:306:17: QML Label: Binding loop detected for property "width"