on xenial help sign in
tweak++
19bf412Michael Zanetti
qml/Stages/DesktopStage.qml+39−18
@@ -163,8 +163,8 @@ FocusScope {
163 x: spreadMaths.animatedX
163 x: spreadMaths.animatedX
164 y: spreadMaths.animatedY + (appDelegate.height - decoratedWindow.height)
164 y: spreadMaths.animatedY + (appDelegate.height - decoratedWindow.height)
165 angle: spreadMaths.animatedAngle
165 angle: spreadMaths.animatedAngle
166− //itemScale: spreadMaths.scale
166+ itemScale: spreadMaths.scale
167− //itemScaleOriginY: appDelegate.height;
167+ itemScaleOriginY: decoratedWindow.height / 2;
168 z: index
168 z: index
169 }
169 }
170 PropertyChanges {
170 PropertyChanges {
@@ -327,35 +327,56 @@ FocusScope {
327 left: parent.left
327 left: parent.left
328 top: parent.top
328 top: parent.top
329 right: parent.right
329 right: parent.right
330+ topMargin: units.gu(3.5) // TODO: should be root.panelHeight
330 }
331 }
331− height: root.height * 0.3
332+ height: root.height * 0.25
332 color: "#55000000"
333 color: "#55000000"
333 opacity: 0
334 opacity: 0
334
335
335 RowLayout {
336 RowLayout {
336− anchors {
337− fill: parent
337+ anchors.fill: parent
338− topMargin: units.gu(5)
339− bottomMargin: units.gu(2)
340− }
341 spacing: units.gu(1)
338 spacing: units.gu(1)
342 Item { Layout.fillWidth: true }
339 Item { Layout.fillWidth: true }
343 Repeater {
340 Repeater {
344 model: 2 // TODO: should be workspacemodel
341 model: 2 // TODO: should be workspacemodel
345− Image {
342+ Item {
346 Layout.fillHeight: true
343 Layout.fillHeight: true
347− Layout.preferredWidth: height * root.width / root.height
344+ Layout.preferredWidth: ((height - units.gu(6)) * root.width / root.height)
345+
346+ Image {
347+ anchors {
348+ fill: parent;
349+ topMargin: units.gu(2);
350+ bottomMargin: units.gu(2);
351+ }
348− source: root.background
352+ source: root.background
353+ }
354+
355+ Rectangle {
356+ anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
357+ height: units.dp(2)
358+ color: UbuntuColors.orange
359+ visible: index == 0 // TODO: should be active workspace index
360+ }
349 }
361 }
362+
350 }
363 }
351− Rectangle {
364+ Item {
352 Layout.fillHeight: true
365 Layout.fillHeight: true
353− Layout.preferredWidth: height * root.width / root.height
366+ Layout.preferredWidth: ((height - units.gu(6)) * root.width / root.height)
367+ Rectangle {
368+ anchors {
369+ fill: parent;
370+ topMargin: units.gu(2);
371+ bottomMargin: units.gu(2);
372+ }
354− color: "#22ffffff"
373+ color: "#22ffffff"
374+
355− Label {
375+ Label {
356− anchors.centerIn: parent
376+ anchors.centerIn: parent
357− font.pixelSize: parent.height / 2
377+ font.pixelSize: parent.height / 2
358− text: "+"
378+ text: "+"
379+ }
359 }
380 }
360 }
381 }
361 Item { Layout.fillWidth: true }
382 Item { Layout.fillWidth: true }
qml/Stages/SpreadMaths.qml+14−14
@@ -16,12 +16,12 @@ Item {
16 property int sceneHeight: units.gu(20)
16 property int sceneHeight: units.gu(20)
17
17
18 // Spread properties
18 // Spread properties
19− property real spreadHeight: sceneHeight * 0.35
19+ property real spreadHeight: sceneHeight * 0.4
20 property int spreadBottomOffset: sceneHeight * 0.2
20 property int spreadBottomOffset: sceneHeight * 0.2
21 property int foldingAreaWidth: flickableWidth * 0.2
21 property int foldingAreaWidth: flickableWidth * 0.2
22 property int maxVisibleItems: 7
22 property int maxVisibleItems: 7
23 property int margins: flickableWidth * 0.05
23 property int margins: flickableWidth * 0.05
24− property real stackScale: 0.04
24+ property real stackScale: 0.1
25 property int leftEndFoldedAngle: 70
25 property int leftEndFoldedAngle: 70
26 property int rightEndFoldedAngle: 65
26 property int rightEndFoldedAngle: 65
27 property int unfoldedAngle: 30
27 property int unfoldedAngle: 30
@@ -78,27 +78,27 @@ Item {
78
78
79 readonly property int animatedY: sceneHeight - itemHeight - spreadBottomOffset +
79 readonly property int animatedY: sceneHeight - itemHeight - spreadBottomOffset +
80 (limitedLeftProgress > 0 ?
80 (limitedLeftProgress > 0 ?
81+ 0
81− linearAnimation(0, 1, yOffset, 0, leftEasing.value)
82+// linearAnimation(0, 1, yOffset, 0, leftEasing.value)
82 : limitedRightProgress > 0 ?
83 : limitedRightProgress > 0 ?
84+ 0
83− linearAnimation(0, 1, yOffset, 0, rightEasing.value)
85+// linearAnimation(0, 1, yOffset, 0, rightEasing.value)
84− : yOffset)
86+ : 0)
85
87
86
88
87
89
88 readonly property int animatedAngle: limitedLeftProgress > 0 ?
90 readonly property int animatedAngle: limitedLeftProgress > 0 ?
89− linearAnimation(0, 2, unfoldedAngle, leftEndFoldedAngle, Math.min(2, leftFoldingAreaProgress))
91+ linearAnimation(0, 2, unfoldedAngle, leftEndFoldedAngle, limitedLeftProgress)
90 : limitedRightProgress > 0 ?
92 : limitedRightProgress > 0 ?
91− linearAnimation(0, 2, unfoldedAngle, rightEndFoldedAngle, Math.min(2, rightFoldingAreaProgress))
93+ linearAnimation(0, 2, unfoldedAngle, rightEndFoldedAngle, limitedRightProgress)
92 : unfoldedAngle
94 : unfoldedAngle
93
95
94
96
95− readonly property real scale: (limitedLeftProgress > 0 ?
97+ readonly property real scale: limitedLeftProgress > 0 ?
96− linearAnimation(0, 1, spreadHeight * (1 - stackScale), spreadHeight, leftEasing.value)
98+ linearAnimation(0, 1, 1, 1 + stackScale, leftEasing.value)
97− : limitedRightProgress > 0 ?
99+ : limitedRightProgress > 0 ?
98− linearAnimation(0, 1, spreadHeight * (1 - stackScale), spreadHeight, rightEasing.value)
100+ linearAnimation(0, 1, 1, 1 + stackScale, rightEasing.value)
99− : spreadHeight * (1 - stackScale)
101+ : 1
100− ) / itemHeight
101−
102
102
103 readonly property real tileInfoOpacity: leftFoldingAreaProgress > 0 ?
103 readonly property real tileInfoOpacity: leftFoldingAreaProgress > 0 ?
104 linearAnimation(1, 2, 1, 0, leftFoldingAreaProgress)
104 linearAnimation(1, 2, 1, 0, leftFoldingAreaProgress)