aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Gräßlin <mgraesslin@kde.org>2012-04-10 19:58:18 (GMT)
committerMartin Gräßlin <mgraesslin@kde.org>2012-04-16 15:42:10 (GMT)
commitf9a5f5d74bc5be5d0614eeb2c11db56a3e44a377 (patch)
tree8babcda39ed2c11230891f4200ca3b722812aad6
parent41b0647ad4ad052a3b6b049cb8ffdc526a6e03fd (diff)
Horizontal center the Thumbnail ListView
This ensures that also for a small TabBox with just one item the thumbnail is nicely centered. REVIEW: 104541 CCBUG: 297856
-rw-r--r--kwin/tabbox/qml/clients/thumbnails/contents/ui/main.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/kwin/tabbox/qml/clients/thumbnails/contents/ui/main.qml b/kwin/tabbox/qml/clients/thumbnails/contents/ui/main.qml
index cba0e80..7b463d6 100644
--- a/kwin/tabbox/qml/clients/thumbnails/contents/ui/main.qml
+++ b/kwin/tabbox/qml/clients/thumbnails/contents/ui/main.qml
@@ -75,14 +75,14 @@ Item {
height: thumbnailWidth * (1.0/screenFactor) + hoverItem.margins.bottom + hoverItem.margins.top
spacing: 5
highlightMoveDuration: 250
+ width: Math.min(parent.width - (anchors.leftMargin + anchors.rightMargin) - (hoverItem.margins.left + hoverItem.margins.right), thumbnailWidth * count + 5 * (count - 1))
anchors {
top: parent.top
- left: parent.left
- right: parent.right
topMargin: background.margins.top
leftMargin: background.margins.left
rightMargin: background.margins.right
bottomMargin: background.margins.bottom
+ horizontalCenter: parent.horizontalCenter
}
clip: true
delegate: Item {