on xenial help sign in
fix interaction when in spread
49d5621Michael Zanetti
qml/Stages/TabletStage.qml+3−6
@@ -36,7 +36,7 @@ Item {
36 property bool fullscreen: true
36 property bool fullscreen: true
37 property bool overlayMode: false
37 property bool overlayMode: false
38
38
39− readonly property int overlayWidth: priv.overlayOverride ? 0 : priv.sideStageWidth
39+ readonly property int overlayWidth: priv.overlayOverride ? 0 : spreadView.sideStageWidth
40
40
41 QtObject {
41 QtObject {
42 id: priv
42 id: priv
@@ -76,24 +76,19 @@ Item {
76 function evaluateOneWayFlick(gesturePoints) {
76 function evaluateOneWayFlick(gesturePoints) {
77 // Need to have at least 3 points to recognize it as a flick
77 // Need to have at least 3 points to recognize it as a flick
78 if (gesturePoints.length < 3) {
78 if (gesturePoints.length < 3) {
79− print("not enough points...")
80 return false;
79 return false;
81 }
80 }
82 // Need to have a movement of at least 2 grid units to recognize it as a flick
81 // Need to have a movement of at least 2 grid units to recognize it as a flick
83 if (Math.abs(gesturePoints[gesturePoints.length - 1] - gesturePoints[0]) < units.gu(2)) {
82 if (Math.abs(gesturePoints[gesturePoints.length - 1] - gesturePoints[0]) < units.gu(2)) {
84− print("not moved far enough")
85 return false;
83 return false;
86 }
84 }
87
85
88 var oneWayFlick = true;
86 var oneWayFlick = true;
89 var smallestX = gesturePoints[0];
87 var smallestX = gesturePoints[0];
90 var leftWards = gesturePoints[1] < gesturePoints[0];
88 var leftWards = gesturePoints[1] < gesturePoints[0];
91− print("is leftwards", leftWards)
92 for (var i = 1; i < gesturePoints.length; i++) {
89 for (var i = 1; i < gesturePoints.length; i++) {
93− print("point is", gesturePoints[i])
94 if ((leftWards && gesturePoints[i] >= smallestX)
90 if ((leftWards && gesturePoints[i] >= smallestX)
95 || (!leftWards && gesturePoints[i] <= smallestX)) {
91 || (!leftWards && gesturePoints[i] <= smallestX)) {
96− print("found jitter", leftWards, gesturePoints[i], smallestX)
97 oneWayFlick = false;
92 oneWayFlick = false;
98 break;
93 break;
99 }
94 }
@@ -320,6 +315,8 @@ Item {
320 width: model.stage == ApplicationInfoInterface.MainStage ? spreadView.width : spreadView.sideStageWidth
315 width: model.stage == ApplicationInfoInterface.MainStage ? spreadView.width : spreadView.sideStageWidth
321// opacity: .3
316// opacity: .3
322
317
318+ onWidthChanged: print("width changed!", width)
319+
323 active: model.appId == priv.mainStageAppId || model.appId == priv.sideStageAppId
320 active: model.appId == priv.mainStageAppId || model.appId == priv.sideStageAppId
324 zIndex: parent.z
321 zIndex: parent.z
325 selected: spreadView.selectedIndex == index
322 selected: spreadView.selectedIndex == index