on xenial help sign in
Some design nits
commita0dba63104ea26061b13c68e6e107ff2cf647ebd authorMichael Terry <michael.terry@canonical.com> dateFri 19 Dec 2014, 09:30 (12 years ago) parente969c9a
4 files changed+15−7
qml/Launcher/Launcher.qml+8−4 qml/Tutorial/TutorialLeft.qml+2−2 qml/Tutorial/TutorialLeftFinish.qml+1 qml/Tutorial/TutorialPage.qml+4−1
qml/Launcher/Launcher.qml+8−4
@@ -69,8 +69,12 @@ Item {
6969 animateTimer.start();
7070 }
7171
72− function tease() {
72+ function tease(interval) {
7373 if (available && !dragArea.dragging) {
74+ if (interval === undefined) {
75+ interval = 200;
76+ }
77+ teaseTimer.interval = interval;
7478 teaseTimer.mode = "teasing"
7579 teaseTimer.start();
7680 }
@@ -78,6 +82,7 @@ Item {
7882
7983 function hint() {
8084 if (available && root.state == "") {
85+ teaseTimer.interval = 300;
8186 teaseTimer.mode = "hinting"
8287 teaseTimer.start();
8388 }
@@ -85,8 +90,7 @@ Item {
8590
8691 Timer {
8792 id: teaseTimer
88− interval: mode == "teasing" ? 200 : 300
89− property string mode: "teasing"
93+ property string mode
9094 }
9195
9296 Timer {
@@ -158,7 +162,7 @@ Item {
158162
159163 MouseArea {
160164 id: launcherDragArea
161− enabled: root.state == "visible"
165+ enabled: root.available && root.state == "visible"
162166 anchors.fill: panel
163167 anchors.rightMargin: -units.gu(2)
164168 drag {
qml/Tutorial/TutorialLeft.qml+2−2
@@ -30,10 +30,10 @@ TutorialPage {
3030
3131 Timer {
3232 id: teaseTimer
33− interval: 2000
33+ interval: UbuntuAnimation.SleepyDuration
3434 repeat: true
3535 running: !root.paused
36− onTriggered: root.launcher.tease()
36+ onTriggered: root.launcher.tease(UbuntuAnimation.SleepyDuration)
3737 }
3838
3939 foreground {
qml/Tutorial/TutorialLeftFinish.qml+1
@@ -22,6 +22,7 @@ TutorialPage {
2222
2323 title: i18n.tr("These are the shortcuts to favorite apps")
2424 text: i18n.tr("Tap here to finish.")
25+ fullTextWidth: true
2526
2627 foreground {
2728 children: [
qml/Tutorial/TutorialPage.qml+4−1
@@ -30,6 +30,9 @@ Showable {
3030 // Whether animations are paused
3131 property bool paused
3232
33+ // Whether to give the text the full width that the title has
34+ property bool fullTextWidth
35+
3336 // Whether whole page (background + foreground) or just the foreground fades in
3437 property bool backgroundFadesIn: false
3538
@@ -136,7 +139,7 @@ Showable {
136139 left: parent.left
137140 leftMargin: d.sideMargin + d.textXOffset
138141 }
139− width: (parent.width - d.sideMargin * 2) * 0.66
142+ width: (parent.width - d.sideMargin * 2) * (fullTextWidth ? 1 : 0.66)
140143 horizontalAlignment: Text.AlignLeft
141144 wrapMode: Text.Wrap
142145 font.weight: Font.Light