[Desktop] Avoid binding loop on label.width by anchoring left/right to the frame
Needs RevisionPublic

Authored by Zren on Jun 12 2017, 8:03 PM.



Is there a reason we need to have the label to be implicitWidth?
Right now, we get a binding loop on width: Math.min(label.implicitWidth + units.smallSpacing, parent.width - units.smallSpacing * 4).

file:///home/chris/.local/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/FolderItemDelegate.qml:288:17: QML Text: Binding loop detected for property "width"

Also, the icon uses units.smallSpacing for the leftMargin, while the label currently uses 2 * units.smallSpacing for the leftMargin. I've changed it so they're both the same width since width is more important for the label.



Diff Detail

R119 Plasma Desktop
Lint Skipped
Unit Tests Skipped
Zren created this revision.Jun 12 2017, 8:03 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 12 2017, 8:03 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
hein requested changes to this revision.Jun 12 2017, 8:24 PM

This most likely breaks the text position in the rename editor matching the label position.

The rectangle selection code also tests for intersection with the icon and label rects to avoid irritation when accidentally selecting icons. The label rect being larger than the bounding box of the visible text breaks this optimization. It could maybe be reintroduced in the selection test code.

This revision now requires changes to proceed.Jun 12 2017, 8:24 PM