Commit 6b1cc98f authored by Nate Graham's avatar Nate Graham 🔩

[Folder view] Fix binding loop on width

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

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, gvgeo, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D27261
parent f32f0f0c
......@@ -315,12 +315,14 @@ Item {
AnchorChanges {
target: label
anchors.top: icon.bottom
anchors.horizontalCenter: parent.horizontalCenter
anchors.left: parent.left
anchors.right: parent.right
}
PropertyChanges {
target: label
anchors.topMargin: units.smallSpacing
width: Math.round(Math.min(label.implicitWidth + units.smallSpacing, parent.width - units.smallSpacing))
anchors.leftMargin: units.smallSpacing / 2
anchors.rightMargin: units.smallSpacing / 2
maximumLineCount: plasmoid.configuration.textLines
horizontalAlignment: Text.AlignHCenter
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment