Merge lp:~mzanetti/unity8/uninvert-launcher-in-desktop-mode into lp:unity8

Proposed by Michael Zanetti
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 1456
Merged at revision: 1489
Proposed branch: lp:~mzanetti/unity8/uninvert-launcher-in-desktop-mode
Merge into: lp:unity8
Prerequisite: lp:~mzanetti/unity8/desktop-stage
Diff against target: 241 lines (+85/-41)
6 files modified
qml/Launcher/Launcher.qml (+1/-0)
qml/Launcher/LauncherPanel.qml (+2/-1)
qml/Shell.qml (+7/-5)
qml/Stages/DecoratedWindow.qml (+60/-0)
qml/Stages/DesktopStage.qml (+8/-24)
tests/qmltests/tst_Shell.qml (+7/-11)
To merge this branch: bzr merge lp:~mzanetti/unity8/uninvert-launcher-in-desktop-mode
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
Albert Astals Cid (community) Needs Fixing
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+242369@code.launchpad.net

Commit message

Uninvert Launcher in Desktop Mode

Also some little restruturing

Description of the change

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

yes, see prereqs

 * 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?

err... not sure what to do with question this atm. So far I'm changing the obvious without touching the phone experience

To post a comment you must log in.
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: Needs Fixing (continuous-integration)
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: Needs Fixing (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

Tested and am happy, approved

* Did you perform an exploratory manual test run of the code change and any related functionality?
Y
 * Did CI run pass? If not, please explain why.
Just kicked off a new build, suspect other AP instability to blame here
 * Did you make sure that the branch does not contain spurious tags?
Y

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

Text conflict in tests/qmltests/tst_Shell.qml
1 conflicts encountered.

Note: Was top approved before this.

review: Needs Fixing
Revision history for this message
Michael Zanetti (mzanetti) wrote :

> Text conflict in tests/qmltests/tst_Shell.qml
> 1 conflicts encountered.
>
> Note: Was top approved before this.

merged/resolved

Revision history for this message
Albert Astals Cid (aacid) wrote :

Text conflict in debian/unity8-common.install
1 conflicts encountered.

Note: Was top approved before this.

review: Needs Fixing
1457. By Michael Zanetti

merge prereq

1458. By Michael Zanetti

clip the launcher button

Revision history for this message
Gerry Boland (gerboland) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Launcher/Launcher.qml'
2--- qml/Launcher/Launcher.qml 2014-11-19 17:43:09 +0000
3+++ qml/Launcher/Launcher.qml 2014-12-05 11:28:53 +0000
4@@ -24,6 +24,7 @@
5 id: root
6
7 property bool available: true // can be used to disable all interactions
8+ property alias inverted: panel.inverted
9
10 property int panelWidth: units.gu(8)
11 property int dragAreaWidth: units.gu(1)
12
13=== modified file 'qml/Launcher/LauncherPanel.qml'
14--- qml/Launcher/LauncherPanel.qml 2014-11-20 10:19:40 +0000
15+++ qml/Launcher/LauncherPanel.qml 2014-12-05 11:28:53 +0000
16@@ -29,7 +29,7 @@
17 rotation: inverted ? 180 : 0
18
19 property var model
20- property bool inverted: true
21+ property bool inverted: false
22 property bool dragging: false
23 property bool moving: launcherListView.moving || launcherListView.flicking
24 property bool preventHiding: moving || dndArea.draggedIndex >= 0 || quickList.state === "open" || dndArea.pressed
25@@ -54,6 +54,7 @@
26 objectName: "buttonShowDashHome"
27 width: parent.width
28 height: units.gu(7)
29+ clip: true
30
31 UbuntuShape {
32 anchors {
33
34=== modified file 'qml/Shell.qml'
35--- qml/Shell.qml 2014-12-05 11:28:53 +0000
36+++ qml/Shell.qml 2014-12-05 11:28:53 +0000
37@@ -129,6 +129,11 @@
38 sourceSize.width: 0
39 }
40
41+ GSettings {
42+ id: usageModeSettings
43+ schema.id: "com.canonical.Unity8"
44+ }
45+
46 Binding {
47 target: LauncherModel
48 property: "applicationManager"
49@@ -270,11 +275,6 @@
50 source: usageModeSettings.usageMode === "Windowed" ? "Stages/DesktopStage.qml"
51 : tabletMode ? "Stages/TabletStage.qml" : "Stages/PhoneStage.qml"
52
53- GSettings {
54- id: usageModeSettings
55- schema.id: "com.canonical.Unity8"
56- }
57-
58 Binding {
59 target: applicationsDisplayLoader.item
60 property: "objectName"
61@@ -733,10 +733,12 @@
62 readonly property bool dashSwipe: progress > 0
63
64 anchors.top: parent.top
65+ anchors.topMargin: inverted ? 0 : panel.panelHeight
66 anchors.bottom: parent.bottom
67 width: parent.width
68 dragAreaWidth: shell.edgeSize
69 available: edgeDemo.launcherEnabled && (!shell.locked || AccountsService.enableLauncherWhileLocked) && !greeter.hasLockedApp
70+ inverted: usageModeSettings.usageMode === "Staged"
71
72 onShowDashHome: showHome()
73 onDash: showDash()
74
75=== added file 'qml/Stages/DecoratedWindow.qml'
76--- qml/Stages/DecoratedWindow.qml 1970-01-01 00:00:00 +0000
77+++ qml/Stages/DecoratedWindow.qml 2014-12-05 11:28:53 +0000
78@@ -0,0 +1,60 @@
79+/*
80+ * Copyright (C) 2014 Canonical, Ltd.
81+ *
82+ * This program is free software; you can redistribute it and/or modify
83+ * it under the terms of the GNU General Public License as published by
84+ * the Free Software Foundation; version 3.
85+ *
86+ * This program is distributed in the hope that it will be useful,
87+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
88+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
89+ * GNU General Public License for more details.
90+ *
91+ * You should have received a copy of the GNU General Public License
92+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
93+ *
94+ * Authors: Michael Zanetti <michael.zanetti@canonical.com>
95+ */
96+
97+import QtQuick 2.3
98+import Ubuntu.Components 1.1
99+import Unity.Application 0.1
100+
101+Item {
102+ id: root
103+
104+ property alias application: applicationWindow.application
105+ property alias active: decoration.active
106+
107+ signal requestFocus();
108+ signal close();
109+ signal maximize();
110+ signal minimize();
111+
112+ BorderImage {
113+ anchors {
114+ fill: root
115+ margins: -units.gu(2)
116+ }
117+ source: "graphics/dropshadow2gu.sci"
118+ opacity: .3
119+ Behavior on opacity { UbuntuNumberAnimation {} }
120+ }
121+
122+ WindowDecoration {
123+ id: decoration
124+ anchors { left: parent.left; top: parent.top; right: parent.right }
125+ height: units.gu(3)
126+ title: model.name
127+ onClose: root.close();
128+ onMaximize: root.maximize();
129+ onMinimize: root.minimize();
130+ }
131+
132+ ApplicationWindow {
133+ id: applicationWindow
134+ anchors.fill: parent
135+ anchors.topMargin: units.gu(3)
136+ interactive: index == 0
137+ }
138+}
139
140=== modified file 'qml/Stages/DesktopStage.qml'
141--- qml/Stages/DesktopStage.qml 2014-12-05 11:28:53 +0000
142+++ qml/Stages/DesktopStage.qml 2014-12-05 11:28:53 +0000
143@@ -61,9 +61,10 @@
144
145 delegate: Item {
146 id: appDelegate
147- height: units.gu(30)
148- width: units.gu(30)
149 z: ApplicationManager.count - index
150+ width: units.gu(60)
151+ height: units.gu(50)
152+
153
154 states: [
155 State {
156@@ -84,16 +85,6 @@
157 }
158 ]
159
160- BorderImage {
161- anchors {
162- fill: appDelegate
163- margins: -units.gu(2)
164- }
165- source: "graphics/dropshadow2gu.sci"
166- opacity: .3
167- Behavior on opacity { UbuntuNumberAnimation {} }
168- }
169-
170 MouseArea {
171 anchors.fill: parent
172 anchors.margins: -units.gu(0.5)
173@@ -141,21 +132,14 @@
174 }
175 }
176
177- WindowDecoration {
178- anchors { left: parent.left; top: parent.top; right: parent.right }
179- height: units.gu(3)
180- title: model.name
181+ DecoratedWindow {
182+ anchors.fill: parent
183+ application: ApplicationManager.get(index)
184+ active: ApplicationManager.focusedApplicationId === model.appId
185+
186 onClose: ApplicationManager.stopApplication(model.appId)
187 onMaximize: appDelegate.state = (appDelegate.state == "maximized" ? "normal" : "maximized")
188 onMinimize: appDelegate.state = "minimized"
189- active: ApplicationManager.focusedApplicationId == model.appId
190- }
191-
192- ApplicationWindow {
193- anchors.fill: parent
194- anchors.topMargin: units.gu(3)
195- application: ApplicationManager.get(index)
196- interactive: index == 0
197 }
198 }
199 }
200
201=== modified file 'tests/qmltests/tst_Shell.qml'
202--- tests/qmltests/tst_Shell.qml 2014-12-02 09:25:56 +0000
203+++ tests/qmltests/tst_Shell.qml 2014-12-05 11:28:53 +0000
204@@ -496,16 +496,8 @@
205 function tapOnAppIconInLauncher() {
206 var launcherPanel = findChild(shell, "launcherPanel");
207
208- // pick the first icon, the one at the bottom.
209+ // pick the first icon, the one at the top.
210 var appIcon = findChild(launcherPanel, "launcherDelegate0")
211-
212- // Swipe upwards over the launcher to ensure that this icon
213- // at the bottom is not folded and faded away.
214- var touchStartX = launcherPanel.width / 2;
215- var touchEndY = launcherPanel.height / 2;
216- touchFlick(launcherPanel, touchStartX, 0, touchStartX, touchEndY);
217- tryCompare(launcherPanel, "moving", false);
218-
219 tap(appIcon, appIcon.width / 2, appIcon.height / 2);
220 }
221
222@@ -753,13 +745,17 @@
223 dragLauncherIntoView();
224
225 // Emulate a tap with a finger, where the touch position drifts during the tap.
226+ // This is to test the touch ownership changes. The tap is happening on the button
227+ // area but then drifting into the left edge drag area. This test makes sure
228+ // the touch ownership stays with the button and doesn't move over to the
229+ // left edge drag area.
230 {
231 var buttonShowDashHome = findChild(launcher, "buttonShowDashHome");
232 var startPos = buttonShowDashHome.mapToItem(shell,
233- buttonShowDashHome.width * 0.2,
234+ buttonShowDashHome.width * 0.8,
235 buttonShowDashHome.height * 0.2);
236 var endPos = buttonShowDashHome.mapToItem(shell,
237- buttonShowDashHome.width * 0.8,
238+ buttonShowDashHome.width * 0.2,
239 buttonShowDashHome.height * 0.8);
240 touchFlick(shell, startPos.x, startPos.y, endPos.x, endPos.y);
241 }

Subscribers

People subscribed via source and target branches