diff --git a/applet/contents/ui/DetailsText.qml b/applet/contents/ui/DetailsText.qml --- a/applet/contents/ui/DetailsText.qml +++ b/applet/contents/ui/DetailsText.qml @@ -25,7 +25,7 @@ Item { property var details: [] - height: repeater.contentHeight + height: childrenRect.height + units.smallSpacing KQuickControlsAddons.Clipboard { id: clipboard @@ -50,7 +50,11 @@ } Column { - anchors.fill: parent + anchors { + left: parent.left + right: parent.right + } + height: childrenRect.height Repeater { id: repeater @@ -64,7 +68,6 @@ anchors { left: parent.left right: parent.right - topMargin: Math.round(units.gridUnit / 3) } height: Math.max(detailNameLabel.height, detailValueLabel.height) @@ -74,7 +77,6 @@ anchors { left: parent.left leftMargin: repeater.longestString - paintedWidth + Math.round(units.gridUnit / 2) - verticalCenter: parent.verticalCenter } height: paintedHeight font.pointSize: theme.smallestFont.pointSize @@ -92,9 +94,9 @@ id: detailValueLabel anchors { - left: detailNameLabel.right + left: parent.left right: parent.right - verticalCenter: parent.verticalCenter + leftMargin: repeater.longestString + Math.round(units.gridUnit / 2) } height: paintedHeight elide: Text.ElideRight @@ -109,11 +111,6 @@ } } } - - // Count total height from added items, somehow contentRect.height doesn't work - onItemAdded: { - contentHeight = contentHeight + item.height - } } } }