summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Hein <hein@kde.org>2017-04-13 21:11:54 (GMT)
committerEike Hein <hein@kde.org>2017-04-13 21:11:54 (GMT)
commit59528fdc731afe5603bbca9f11c021b6d3415945 (patch)
treed661a437e5c692424d41d53d497545e0faf80440
parent6791ed1232d9a6538e51ee53bfc8a4bb6bd0fdf9 (diff)
Backport the word wrapping fix from master.
-rw-r--r--containments/desktop/package/contents/ui/FolderItemDelegate.qml10
1 files changed, 1 insertions, 9 deletions
diff --git a/containments/desktop/package/contents/ui/FolderItemDelegate.qml b/containments/desktop/package/contents/ui/FolderItemDelegate.qml
index 4b8ad7c..3a760e6 100644
--- a/containments/desktop/package/contents/ui/FolderItemDelegate.qml
+++ b/containments/desktop/package/contents/ui/FolderItemDelegate.qml
@@ -230,14 +230,6 @@ Item {
overlays: model.overlays
}
- TextMetrics {
- id: labelMetrics
-
- font: label.font
- elide: Text.ElideNone
- text: label.text
- }
-
DropShadow {
id: textShadow
@@ -272,7 +264,7 @@ Item {
PropertyChanges {
target: label
anchors.topMargin: 2 * units.smallSpacing
- width: Math.min(labelMetrics.advanceWidth + units.smallSpacing, parent.width - units.smallSpacing * 8)
+ width: Math.min(labelMetrics.implicitWidth + units.smallSpacing, parent.width - units.smallSpacing * 8)
maximumLineCount: plasmoid.configuration.textLines
horizontalAlignment: Text.AlignHCenter
}