From 756bf0a5e34f0e89b8e12cfa22a1c1961a7a0b34 Mon Sep 17 00:00:00 2001 From: Weng Xuetian Date: Tue, 25 Jun 2013 11:09:01 -0400 Subject: [PATCH] Fix BigSmall Icon Tab box behavior when icons can not fit in the screen REVIEW: 111163 --- tabbox/qml/IconTabBox.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tabbox/qml/IconTabBox.qml b/tabbox/qml/IconTabBox.qml index fd9b752cce..c59526183c 100644 --- a/tabbox/qml/IconTabBox.qml +++ b/tabbox/qml/IconTabBox.qml @@ -29,6 +29,7 @@ Item { property alias margins: hoverItem.margins property alias currentItem: iconsListView.currentItem focus: true + clip: true function setModel(model) { @@ -92,9 +93,10 @@ Item { orientation: ListView.Horizontal // used for image provider URL to trick Qt into reloading icons when the model changes property int imageId: 0 - width: (iconSize + margins.left + margins.right) * count + width: Math.min(parent.width, (iconSize + margins.left + margins.right) * count) height: iconSize + margins.top + margins.bottom anchors { + top: parent.top horizontalCenter: parent.horizontalCenter } clip: true