@@ -54,6 +54,12 @@ Item {
55 onPreviewModelChanged: processingMouseArea.enabled = false
55 onPreviewModelChanged: processingMouseArea.enabled = false
59+ property: "widgetColumnCount"
57 MouseArea {
63 MouseArea {
58 anchors.fill: parent
64 anchors.fill: parent
@@ -64,19 +70,22 @@ Item {
64 spacing: units.gu(1)
70 spacing: units.gu(1)
65 anchors { fill: parent; margins: spacing }
71 anchors { fill: parent; margins: spacing }
73+ property int columns: width >= units.gu(80) ? 2 : 1
74+ property real columnWidth: width / columns
67 Repeater {
76 Repeater {
68 model: previewModel
77 model: previewModel
70 delegate: ListView {
79 delegate: ListView {
71 id: column
80 id: column
72 anchors { top: parent.top; bottom: parent.bottom }
81 anchors { top: parent.top; bottom: parent.bottom }
73− width: row.width
82+ width: row.columnWidth
74 spacing: row.spacing
83 spacing: row.spacing
75 bottomMargin: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
84 bottomMargin: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
77 model: columnModel
86 model: columnModel
78 onCountChanged: if (count > 0) root.ready = true
87 onCountChanged: if (count > 0) root.ready = true
79− cacheBuffer: units.gu(40)
88+ cacheBuffer: height
81 Behavior on contentY { UbuntuNumberAnimation { } }
90 Behavior on contentY { UbuntuNumberAnimation { } }
@@ -85,7 +94,12 @@ Item {
85 widgetType: model.type
94 widgetType: model.type
86 widgetData: model.properties
95 widgetData: model.properties
87 isCurrentPreview: root.isCurrent
96 isCurrentPreview: root.isCurrent
88− anchors { left: parent.left; right: parent.right }
99+ right: parent.right
100+ leftMargin: units.gu(1)
101+ rightMargin: units.gu(1)
90 onTriggered: {
104 onTriggered: {
91 processingMouseArea.enabled = true;
105 processingMouseArea.enabled = true;