on xenial help sign in
fix close button getting stuck
0c0f9d8Michael Zanetti
qml/Stages/DesktopStage.qml+10−28
@@ -283,23 +283,23 @@ Rectangle {
283 }
283 }
284
284
285 Image {
285 Image {
286+ id: closeImage
286− anchors { left: parent.left; top: parent.top; leftMargin: -height / 2; topMargin: -height / 2 }
287+ anchors { left: parent.left; top: parent.top; leftMargin: -height / 2; topMargin: -height / 2 + spreadMaths.closeIconOffset }
287 source: "graphics/window-close.svg"
288 source: "graphics/window-close.svg"
288 visible: spreadSelectArea.upperThirdContainsMouse || closeMouseArea.containsMouse
289 visible: spreadSelectArea.upperThirdContainsMouse || closeMouseArea.containsMouse
289 height: units.gu(1.5)
290 height: units.gu(1.5)
290 width: height
291 width: height
291 sourceSize.width: width
292 sourceSize.width: width
292 sourceSize.height: height
293 sourceSize.height: height
293−
294− MouseArea {
295− id: closeMouseArea
296− anchors.fill: parent
297− anchors.margins: -units.gu(1)
298− hoverEnabled: true
299− onClicked: ApplicationManager.stopApplication(model.appId)
300− }
301 }
294 }
302
295
296+ MouseArea {
297+ id: closeMouseArea
298+ anchors.fill: closeImage
299+ anchors.margins: -units.gu(1)
300+ hoverEnabled: true
301+ onClicked: ApplicationManager.stopApplication(model.appId)
302+ }
303
303
304 ColumnLayout {
304 ColumnLayout {
305 id: tileInfo
305 id: tileInfo
@@ -334,16 +334,10 @@ Rectangle {
334 contentWidth: Math.max(6, ApplicationManager.count) * Math.min(height / 4, width / 5)
334 contentWidth: Math.max(6, ApplicationManager.count) * Math.min(height / 4, width / 5)
335 enabled: false
335 enabled: false
336
336
337− //visible: false
338− //boundsBehavior: Flickable.StopAtBounds
339−
340 onContentXChanged: print("contentXChanged", contentX)
337 onContentXChanged: print("contentXChanged", contentX)
341
338
342− function ensureVisible(index) {
343−
344− }
345−
346 function snapTo(contentX) {
339 function snapTo(contentX) {
340+ snapAnimation.stop();
347 snapAnimation.to = contentX
341 snapAnimation.to = contentX
348 snapAnimation.start();
342 snapAnimation.start();
349 }
343 }
@@ -446,18 +440,6 @@ Rectangle {
446 visible: false
440 visible: false
447 }
441 }
448
442
449− Label {
450− anchors { left: parent.left; bottom: parent.bottom; margins: units.gu(1) }
451− text: "Progress: " + (spreadFlickable.contentX / (spreadFlickable.contentWidth - spreadFlickable.width)).toFixed(3) +
452− ", ContentX: " + spreadFlickable.contentX +
453− ", Width: " + spreadFlickable.width +
454− ", ContentWidth: " + spreadFlickable.contentWidth
455−
456− color: "red"
457− fontSize: "x-large"
458− z: 100
459− }
460−
461 states: [
443 states: [
462 State {
444 State {
463 name: "windowed"
445 name: "windowed"
qml/Stages/SpreadMaths.qml+6
@@ -110,6 +110,12 @@ Item {
110 linearAnimation(0, 1, 1, 1 + stackScale, rightEasing.value)
110 linearAnimation(0, 1, 1, 1 + stackScale, rightEasing.value)
111 : 0.95 + Math.abs(middleSectionProgress - 0.5) * 0.1
111 : 0.95 + Math.abs(middleSectionProgress - 0.5) * 0.1
112
112
113+ readonly property real closeIconOffset: limitedLeftProgress > 0 ?
114+ linearAnimation(0, 1, 0, - itemHeight * stackScale * 0.5, leftEasing.value)
115+ : limitedRightProgress > 0 ?
116+ linearAnimation(0, 1, 0, - itemHeight * stackScale * 0.5, rightEasing.value)
117+ : 0
118+
113 readonly property real tileInfoOpacity: leftFoldingAreaProgress > 0 ?
119 readonly property real tileInfoOpacity: leftFoldingAreaProgress > 0 ?
114 linearAnimation(1, 2, 1, 0, leftFoldingAreaProgress)
120 linearAnimation(1, 2, 1, 0, leftFoldingAreaProgress)
115 : rightFoldingAreaProgress > 0 ?
121 : rightFoldingAreaProgress > 0 ?