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
This commit is contained in:
Martin Gräßlin 2012-04-10 21:58:18 +02:00
parent 3193b46108
commit 611e225fd6

View file

@ -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 {