From 611e225fd6c1b56ca5291d4f8fe381f9d27f2673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 10 Apr 2012 21:58:18 +0200 Subject: [PATCH] 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 --- tabbox/qml/clients/thumbnails/contents/ui/main.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tabbox/qml/clients/thumbnails/contents/ui/main.qml b/tabbox/qml/clients/thumbnails/contents/ui/main.qml index cba0e80c49..7b463d66e4 100644 --- a/tabbox/qml/clients/thumbnails/contents/ui/main.qml +++ b/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 {