@@ -11,8 +11,10 @@ Item {
11 property string background
11 property string background
14 anchors.bottom: parent.bottom
15 anchors.bottom: parent.bottom
15 anchors.horizontalCenter: parent.horizontalCenter
16 anchors.horizontalCenter: parent.horizontalCenter
17+ Behavior on anchors.horizontalCenterOffset { UbuntuNumberAnimation { duration: UbuntuAnimation.SlowDuration } }
16// anchors.left: parent.left
18// anchors.left: parent.left
17 spacing: units.gu(1)
19 spacing: units.gu(1)
@@ -70,7 +72,7 @@ Item {
70 actions: ActionList {
72 actions: ActionList {
72 text: "Add workspace"
74 text: "Add workspace"
73− onTriggered: workspaces.workspaceModel.append({text: "" + workspaces.workspaceModel.count})
75+ onTriggered: workspaces.workspaceModel.append({text: "" + (workspaces.workspaceModel.count + 1)})
@@ -92,11 +94,11 @@ Item {
92 workspaceModel: ListModel {
94 workspaceModel: ListModel {
93 onCountChanged: print("model count changed to", count)
95 onCountChanged: print("model count changed to", count)
94 ListElement {text: "1"}
96 ListElement {text: "1"}
95−// ListElement {text: "2"}
97+ ListElement {text: "2"}
96−// ListElement {text: "3"}
98+ ListElement {text: "3"}
97−// ListElement {text: "4"}
99+ ListElement {text: "4"}
98−// ListElement {text: "5"}
100+ ListElement {text: "5"}
99−// ListElement {text: "6"}
101+ ListElement {text: "6"}
100// ListElement {text: "7"}
102// ListElement {text: "7"}
101// ListElement {text: "8"}
103// ListElement {text: "8"}
102// ListElement {text: "9"}
104// ListElement {text: "9"}
@@ -105,4 +107,43 @@ Item {
112+ anchors { left: parent.left; top: parent.top; bottom: parent.bottom; topMargin: units.gu(6); bottomMargin: units.gu(1) }
117+ anchors.fill: parent
119+ onPressed: mouse.accepted = false;
123+ anchors { right: parent.right; top: parent.top; bottom: parent.bottom; topMargin: units.gu(6); bottomMargin: units.gu(1) }
128+ anchors.fill: parent
130+ onPressed: mouse.accepted = false;
135+ running: leftScrollArea.containsMouse || rightScrollArea.containsMouse
136+ interval: UbuntuAnimation.SlowDuration
138+ var newOffset = row.anchors.horizontalCenterOffset;
139+ var maxOffset = Math.max((row.width - root.width) / 2, 0);
140+ if (leftScrollArea.containsMouse) {
141+ newOffset += units.gu(20)
143+ newOffset -= units.gu(20)
145+ newOffset = Math.max(-maxOffset, Math.min(maxOffset, newOffset));
146+ row.anchors.horizontalCenterOffset = newOffset;