Merge lp:~mzanetti/unity8/launcher-fixes into lp:unity8

Proposed by Michael Zanetti
Status: Merged
Approved by: Daniel d'Andrada
Approved revision: 1588
Merged at revision: 1600
Proposed branch: lp:~mzanetti/unity8/launcher-fixes
Merge into: lp:unity8
Diff against target: 92 lines (+24/-8)
2 files modified
qml/Launcher/LauncherPanel.qml (+7/-5)
tests/qmltests/Launcher/tst_Launcher.qml (+17/-3)
To merge this branch: bzr merge lp:~mzanetti/unity8/launcher-fixes
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Daniel d'Andrada (community) Approve
Review via email: mp+248761@code.launchpad.net

Commit message

Launcher fixes for windowed mode

* When rotating the launcher because switching back and forth between staged/windowed mode, it would break the quicklist width
* Quicklist in rotated launcher painted the arrow on the wrong end
* snap animation fixed for a larger amount icons in the launcher.

Description of the change

 * Are there any related MPs required for this MP to build/function as expected? Please list.

no

 * Did you perform an exploratory manual test run of your code change and any related functionality?

yes

 * Did you make sure that your branch does not contain spurious tags?

yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

n/a

 * If you changed the UI, has there been a design review?

n/a

To post a comment you must log in.
lp:~mzanetti/unity8/launcher-fixes updated
1588. By Michael Zanetti

cleanup

Revision history for this message
MichaƂ Sawicz (saviq) wrote :

Please describe the changes better in the commit msg :P

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Can't claim I really understand the code, but the changes do fix some issues (seem by manual test).

 * Did you perform an exploratory manual test run of the code change and any related functionality?
yes

 * Did CI run pass? If not, please explain why.
No results yes.

 * Did you make sure that the branch does not contain spurious tags?
yes

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Launcher/LauncherPanel.qml'
2--- qml/Launcher/LauncherPanel.qml 2014-12-05 11:28:39 +0000
3+++ qml/Launcher/LauncherPanel.qml 2015-02-05 14:11:59 +0000
4@@ -149,14 +149,14 @@
5 id: snapToBottomAnimation
6 target: launcherListView
7 property: "contentY"
8- to: launcherListView.originY
9+ to: launcherListView.originY + launcherListView.topMargin
10 }
11
12 UbuntuNumberAnimation {
13 id: snapToTopAnimation
14 target: launcherListView
15 property: "contentY"
16- to: launcherListView.contentHeight - launcherListView.height + launcherListView.originY
17+ to: launcherListView.contentHeight - launcherListView.height + launcherListView.originY - launcherListView.topMargin
18 }
19
20 displaced: Transition {
21@@ -521,12 +521,12 @@
22 left: parent.left
23 leftMargin: (quickList.item.width - units.gu(1)) / 2 - width / 2
24 verticalCenter: parent.verticalCenter
25- verticalCenterOffset: (parent.height / 2 + units.dp(3)) * (quickList.offset > 0 ? 1 : -1)
26+ verticalCenterOffset: (parent.height / 2 + units.dp(3)) * (quickList.offset > 0 ? 1 : -1) * (root.inverted ? 1 : -1)
27 }
28 height: units.gu(1)
29 width: units.gu(2)
30 source: "graphics/quicklist_tooltip.png"
31- rotation: quickList.offset > 0 ? 0 : 180
32+ rotation: (quickList.offset > 0 ? 0 : 180) + (root.inverted ? 0 : 180)
33 }
34
35 InverseMouseArea {
36@@ -543,7 +543,9 @@
37 id: quickList
38 objectName: "quickList"
39 color: "#f5f5f5"
40- width: units.gu(30)
41+ // Because we're setting left/right anchors depending on orientation, it will break the
42+ // width setting after rotating twice. This makes sure we also re-apply width on rotation
43+ width: root.inverted ? units.gu(30) : units.gu(30)
44 height: quickListColumn.height
45 visible: quickListShape.visible
46 anchors {
47
48=== modified file 'tests/qmltests/Launcher/tst_Launcher.qml'
49--- tests/qmltests/Launcher/tst_Launcher.qml 2015-01-09 09:15:45 +0000
50+++ tests/qmltests/Launcher/tst_Launcher.qml 2015-02-05 14:11:59 +0000
51@@ -15,6 +15,7 @@
52 */
53
54 import QtQuick 2.0
55+import QtQuick.Layouts 1.1
56 import QtTest 1.0
57 import Unity.Test 0.1 as UT
58 import Ubuntu.Components 1.1
59@@ -74,10 +75,22 @@
60 }
61 }
62
63- Button {
64+ ColumnLayout {
65 anchors { bottom: parent.bottom; right: parent.right; margins: units.gu(1) }
66- text: "emit hinting signal"
67- onClicked: LauncherModel.emitHint()
68+ spacing: units.gu(1)
69+ width: units.gu(20)
70+
71+ Button {
72+ text: "emit hinting signal"
73+ onClicked: LauncherModel.emitHint()
74+ Layout.fillWidth: true
75+ }
76+
77+ Button {
78+ text: "rotate"
79+ onClicked: launcherLoader.item.inverted = !launcherLoader.item.inverted
80+ Layout.fillWidth: true
81+ }
82 }
83
84 SignalSpy {
85@@ -454,6 +467,7 @@
86
87 verify(quickList.y >= units.gu(1));
88 verify(quickList.y + quickList.height + units.gu(1) <= launcher.height);
89+ compare(quickList.width, units.gu(30));
90
91 // Click somewhere in the empty space to dismiss the quicklist
92 mouseClick(launcher, launcher.width - units.gu(1), units.gu(1));

Subscribers

People subscribed via source and target branches