on xenial help sign in
tweak++
commit19bf412e98cbf8ad66dfff22cd8df2269916c1f6 authorMichael Zanetti <michael.zanetti@canonical.com> dateFri 17 Apr 2015, 12:24 (12 years ago) parent815294d
2 files changed+53−32
qml/Stages/DesktopStage.qml+39−18 qml/Stages/SpreadMaths.qml+14−14
qml/Stages/DesktopStage.qml+39−18
@@ -163,8 +163,8 @@ FocusScope {
163163 x: spreadMaths.animatedX
164164 y: spreadMaths.animatedY + (appDelegate.height - decoratedWindow.height)
165165 angle: spreadMaths.animatedAngle
166− //itemScale: spreadMaths.scale
167− //itemScaleOriginY: appDelegate.height;
166+ itemScale: spreadMaths.scale
167+ itemScaleOriginY: decoratedWindow.height / 2;
168168 z: index
169169 }
170170 PropertyChanges {
@@ -327,35 +327,56 @@ FocusScope {
327327 left: parent.left
328328 top: parent.top
329329 right: parent.right
330+ topMargin: units.gu(3.5) // TODO: should be root.panelHeight
330331 }
331− height: root.height * 0.3
332+ height: root.height * 0.25
332333 color: "#55000000"
333334 opacity: 0
334335
335336 RowLayout {
336− anchors {
337− fill: parent
338− topMargin: units.gu(5)
339− bottomMargin: units.gu(2)
340− }
337+ anchors.fill: parent
341338 spacing: units.gu(1)
342339 Item { Layout.fillWidth: true }
343340 Repeater {
344341 model: 2 // TODO: should be workspacemodel
345− Image {
342+ Item {
346343 Layout.fillHeight: true
347− Layout.preferredWidth: height * root.width / root.height
348− source: root.background
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+ }
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+ }
349361 }
362+
350363 }
351− Rectangle {
364+ Item {
352365 Layout.fillHeight: true
353− Layout.preferredWidth: height * root.width / root.height
354− color: "#22ffffff"
355− Label {
356− anchors.centerIn: parent
357− font.pixelSize: parent.height / 2
358− text: "+"
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+ }
373+ color: "#22ffffff"
374+
375+ Label {
376+ anchors.centerIn: parent
377+ font.pixelSize: parent.height / 2
378+ text: "+"
379+ }
359380 }
360381 }
361382 Item { Layout.fillWidth: true }
qml/Stages/SpreadMaths.qml+14−14
@@ -16,12 +16,12 @@ Item {
1616 property int sceneHeight: units.gu(20)
1717
1818 // Spread properties
19− property real spreadHeight: sceneHeight * 0.35
19+ property real spreadHeight: sceneHeight * 0.4
2020 property int spreadBottomOffset: sceneHeight * 0.2
2121 property int foldingAreaWidth: flickableWidth * 0.2
2222 property int maxVisibleItems: 7
2323 property int margins: flickableWidth * 0.05
24− property real stackScale: 0.04
24+ property real stackScale: 0.1
2525 property int leftEndFoldedAngle: 70
2626 property int rightEndFoldedAngle: 65
2727 property int unfoldedAngle: 30
@@ -78,27 +78,27 @@ Item {
7878
7979 readonly property int animatedY: sceneHeight - itemHeight - spreadBottomOffset +
8080 (limitedLeftProgress > 0 ?
81− linearAnimation(0, 1, yOffset, 0, leftEasing.value)
81+ 0
82+// linearAnimation(0, 1, yOffset, 0, leftEasing.value)
8283 : limitedRightProgress > 0 ?
83− linearAnimation(0, 1, yOffset, 0, rightEasing.value)
84− : yOffset)
84+ 0
85+// linearAnimation(0, 1, yOffset, 0, rightEasing.value)
86+ : 0)
8587
8688
8789
8890 readonly property int animatedAngle: limitedLeftProgress > 0 ?
89− linearAnimation(0, 2, unfoldedAngle, leftEndFoldedAngle, Math.min(2, leftFoldingAreaProgress))
91+ linearAnimation(0, 2, unfoldedAngle, leftEndFoldedAngle, limitedLeftProgress)
9092 : limitedRightProgress > 0 ?
91− linearAnimation(0, 2, unfoldedAngle, rightEndFoldedAngle, Math.min(2, rightFoldingAreaProgress))
93+ linearAnimation(0, 2, unfoldedAngle, rightEndFoldedAngle, limitedRightProgress)
9294 : unfoldedAngle
9395
9496
95− readonly property real scale: (limitedLeftProgress > 0 ?
96− linearAnimation(0, 1, spreadHeight * (1 - stackScale), spreadHeight, leftEasing.value)
97− : limitedRightProgress > 0 ?
98− linearAnimation(0, 1, spreadHeight * (1 - stackScale), spreadHeight, rightEasing.value)
99− : spreadHeight * (1 - stackScale)
100− ) / itemHeight
101−
97+ readonly property real scale: limitedLeftProgress > 0 ?
98+ linearAnimation(0, 1, 1, 1 + stackScale, leftEasing.value)
99+ : limitedRightProgress > 0 ?
100+ linearAnimation(0, 1, 1, 1 + stackScale, rightEasing.value)
101+ : 1
102102
103103 readonly property real tileInfoOpacity: leftFoldingAreaProgress > 0 ?
104104 linearAnimation(1, 2, 1, 0, leftFoldingAreaProgress)