on xenial help sign in
fix imports
commit051de4259dae65d23f5b98c2e06eb5e7e58bfba4 authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 14 Feb 2017, 12:18 (10 years ago) parent0278b41
2 files changed+6−2
qml/Stage/Spread/ScreensAndWorkspaces.qml+5−2 qml/Stage/Spread/Workspaces.qml+1
qml/Stage/Spread/ScreensAndWorkspaces.qml+5−2
@@ -14,7 +14,7 @@ Item {
1414 id: row
1515 anchors.bottom: parent.bottom
1616 anchors.horizontalCenter: parent.horizontalCenter
17− Behavior on anchors.horizontalCenterOffset { UbuntuNumberAnimation { duration: UbuntuAnimation.SlowDuration } }
17+ Behavior on anchors.horizontalCenterOffset { NumberAnimation { duration: UbuntuAnimation.SlowDuration } }
1818// anchors.left: parent.left
1919 spacing: units.gu(1)
2020
@@ -112,6 +112,7 @@ Item {
112112 anchors { left: parent.left; top: parent.top; bottom: parent.bottom; topMargin: units.gu(6); bottomMargin: units.gu(1) }
113113 width: units.gu(5)
114114 color: "#33000000"
115+ visible: (row.width - root.width + units.gu(10)) / 2 - row.anchors.horizontalCenterOffset > units.gu(5)
115116 MouseArea {
116117 id: leftScrollArea
117118 anchors.fill: parent
@@ -123,6 +124,7 @@ Item {
123124 anchors { right: parent.right; top: parent.top; bottom: parent.bottom; topMargin: units.gu(6); bottomMargin: units.gu(1) }
124125 width: units.gu(5)
125126 color: "#33000000"
127+ visible: (row.width - root.width + units.gu(10)) / 2 + row.anchors.horizontalCenterOffset > units.gu(5)
126128 MouseArea {
127129 id: rightScrollArea
128130 anchors.fill: parent
@@ -134,9 +136,10 @@ Item {
134136 repeat: true
135137 running: leftScrollArea.containsMouse || rightScrollArea.containsMouse
136138 interval: UbuntuAnimation.SlowDuration
139+ triggeredOnStart: true
137140 onTriggered: {
138141 var newOffset = row.anchors.horizontalCenterOffset;
139− var maxOffset = Math.max((row.width - root.width) / 2, 0);
142+ var maxOffset = Math.max((row.width - root.width + units.gu(10)) / 2, 0);
140143 if (leftScrollArea.containsMouse) {
141144 newOffset += units.gu(20)
142145 } else {
qml/Stage/Spread/Workspaces.qml+1
@@ -1,6 +1,7 @@
11import QtQuick 2.4
22import Ubuntu.Components 1.3
33import "MathUtils.js" as MathUtils
4+import "../../Components"
45
56Item {
67 id: root