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
=== modified file 'qml/Launcher/Launcher.qml'
--- qml/Launcher/Launcher.qml 2014-11-19 17:43:09 +0000
+++ qml/Launcher/Launcher.qml 2014-12-05 11:28:53 +0000
@@ -24,6 +24,7 @@
24 id: root24 id: root
2525
26 property bool available: true // can be used to disable all interactions26 property bool available: true // can be used to disable all interactions
27 property alias inverted: panel.inverted
2728
28 property int panelWidth: units.gu(8)29 property int panelWidth: units.gu(8)
29 property int dragAreaWidth: units.gu(1)30 property int dragAreaWidth: units.gu(1)
3031
=== modified file 'qml/Launcher/LauncherPanel.qml'
--- qml/Launcher/LauncherPanel.qml 2014-11-20 10:19:40 +0000
+++ qml/Launcher/LauncherPanel.qml 2014-12-05 11:28:53 +0000
@@ -29,7 +29,7 @@
29 rotation: inverted ? 180 : 029 rotation: inverted ? 180 : 0
3030
31 property var model31 property var model
32 property bool inverted: true32 property bool inverted: false
33 property bool dragging: false33 property bool dragging: false
34 property bool moving: launcherListView.moving || launcherListView.flicking34 property bool moving: launcherListView.moving || launcherListView.flicking
35 property bool preventHiding: moving || dndArea.draggedIndex >= 0 || quickList.state === "open" || dndArea.pressed35 property bool preventHiding: moving || dndArea.draggedIndex >= 0 || quickList.state === "open" || dndArea.pressed
@@ -54,6 +54,7 @@
54 objectName: "buttonShowDashHome"54 objectName: "buttonShowDashHome"
55 width: parent.width55 width: parent.width
56 height: units.gu(7)56 height: units.gu(7)
57 clip: true
5758
58 UbuntuShape {59 UbuntuShape {
59 anchors {60 anchors {
6061
=== modified file 'qml/Shell.qml'
--- qml/Shell.qml 2014-12-05 11:28:53 +0000
+++ qml/Shell.qml 2014-12-05 11:28:53 +0000
@@ -129,6 +129,11 @@
129 sourceSize.width: 0129 sourceSize.width: 0
130 }130 }
131131
132 GSettings {
133 id: usageModeSettings
134 schema.id: "com.canonical.Unity8"
135 }
136
132 Binding {137 Binding {
133 target: LauncherModel138 target: LauncherModel
134 property: "applicationManager"139 property: "applicationManager"
@@ -270,11 +275,6 @@
270 source: usageModeSettings.usageMode === "Windowed" ? "Stages/DesktopStage.qml"275 source: usageModeSettings.usageMode === "Windowed" ? "Stages/DesktopStage.qml"
271 : tabletMode ? "Stages/TabletStage.qml" : "Stages/PhoneStage.qml"276 : tabletMode ? "Stages/TabletStage.qml" : "Stages/PhoneStage.qml"
272277
273 GSettings {
274 id: usageModeSettings
275 schema.id: "com.canonical.Unity8"
276 }
277
278 Binding {278 Binding {
279 target: applicationsDisplayLoader.item279 target: applicationsDisplayLoader.item
280 property: "objectName"280 property: "objectName"
@@ -733,10 +733,12 @@
733 readonly property bool dashSwipe: progress > 0733 readonly property bool dashSwipe: progress > 0
734734
735 anchors.top: parent.top735 anchors.top: parent.top
736 anchors.topMargin: inverted ? 0 : panel.panelHeight
736 anchors.bottom: parent.bottom737 anchors.bottom: parent.bottom
737 width: parent.width738 width: parent.width
738 dragAreaWidth: shell.edgeSize739 dragAreaWidth: shell.edgeSize
739 available: edgeDemo.launcherEnabled && (!shell.locked || AccountsService.enableLauncherWhileLocked) && !greeter.hasLockedApp740 available: edgeDemo.launcherEnabled && (!shell.locked || AccountsService.enableLauncherWhileLocked) && !greeter.hasLockedApp
741 inverted: usageModeSettings.usageMode === "Staged"
740742
741 onShowDashHome: showHome()743 onShowDashHome: showHome()
742 onDash: showDash()744 onDash: showDash()
743745
=== added file 'qml/Stages/DecoratedWindow.qml'
--- qml/Stages/DecoratedWindow.qml 1970-01-01 00:00:00 +0000
+++ qml/Stages/DecoratedWindow.qml 2014-12-05 11:28:53 +0000
@@ -0,0 +1,60 @@
1/*
2 * Copyright (C) 2014 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors: Michael Zanetti <michael.zanetti@canonical.com>
17 */
18
19import QtQuick 2.3
20import Ubuntu.Components 1.1
21import Unity.Application 0.1
22
23Item {
24 id: root
25
26 property alias application: applicationWindow.application
27 property alias active: decoration.active
28
29 signal requestFocus();
30 signal close();
31 signal maximize();
32 signal minimize();
33
34 BorderImage {
35 anchors {
36 fill: root
37 margins: -units.gu(2)
38 }
39 source: "graphics/dropshadow2gu.sci"
40 opacity: .3
41 Behavior on opacity { UbuntuNumberAnimation {} }
42 }
43
44 WindowDecoration {
45 id: decoration
46 anchors { left: parent.left; top: parent.top; right: parent.right }
47 height: units.gu(3)
48 title: model.name
49 onClose: root.close();
50 onMaximize: root.maximize();
51 onMinimize: root.minimize();
52 }
53
54 ApplicationWindow {
55 id: applicationWindow
56 anchors.fill: parent
57 anchors.topMargin: units.gu(3)
58 interactive: index == 0
59 }
60}
061
=== modified file 'qml/Stages/DesktopStage.qml'
--- qml/Stages/DesktopStage.qml 2014-12-05 11:28:53 +0000
+++ qml/Stages/DesktopStage.qml 2014-12-05 11:28:53 +0000
@@ -61,9 +61,10 @@
6161
62 delegate: Item {62 delegate: Item {
63 id: appDelegate63 id: appDelegate
64 height: units.gu(30)
65 width: units.gu(30)
66 z: ApplicationManager.count - index64 z: ApplicationManager.count - index
65 width: units.gu(60)
66 height: units.gu(50)
67
6768
68 states: [69 states: [
69 State {70 State {
@@ -84,16 +85,6 @@
84 }85 }
85 ]86 ]
8687
87 BorderImage {
88 anchors {
89 fill: appDelegate
90 margins: -units.gu(2)
91 }
92 source: "graphics/dropshadow2gu.sci"
93 opacity: .3
94 Behavior on opacity { UbuntuNumberAnimation {} }
95 }
96
97 MouseArea {88 MouseArea {
98 anchors.fill: parent89 anchors.fill: parent
99 anchors.margins: -units.gu(0.5)90 anchors.margins: -units.gu(0.5)
@@ -141,21 +132,14 @@
141 }132 }
142 }133 }
143134
144 WindowDecoration {135 DecoratedWindow {
145 anchors { left: parent.left; top: parent.top; right: parent.right }136 anchors.fill: parent
146 height: units.gu(3)137 application: ApplicationManager.get(index)
147 title: model.name138 active: ApplicationManager.focusedApplicationId === model.appId
139
148 onClose: ApplicationManager.stopApplication(model.appId)140 onClose: ApplicationManager.stopApplication(model.appId)
149 onMaximize: appDelegate.state = (appDelegate.state == "maximized" ? "normal" : "maximized")141 onMaximize: appDelegate.state = (appDelegate.state == "maximized" ? "normal" : "maximized")
150 onMinimize: appDelegate.state = "minimized"142 onMinimize: appDelegate.state = "minimized"
151 active: ApplicationManager.focusedApplicationId == model.appId
152 }
153
154 ApplicationWindow {
155 anchors.fill: parent
156 anchors.topMargin: units.gu(3)
157 application: ApplicationManager.get(index)
158 interactive: index == 0
159 }143 }
160 }144 }
161 }145 }
162146
=== modified file 'tests/qmltests/tst_Shell.qml'
--- tests/qmltests/tst_Shell.qml 2014-12-02 09:25:56 +0000
+++ tests/qmltests/tst_Shell.qml 2014-12-05 11:28:53 +0000
@@ -496,16 +496,8 @@
496 function tapOnAppIconInLauncher() {496 function tapOnAppIconInLauncher() {
497 var launcherPanel = findChild(shell, "launcherPanel");497 var launcherPanel = findChild(shell, "launcherPanel");
498498
499 // pick the first icon, the one at the bottom.499 // pick the first icon, the one at the top.
500 var appIcon = findChild(launcherPanel, "launcherDelegate0")500 var appIcon = findChild(launcherPanel, "launcherDelegate0")
501
502 // Swipe upwards over the launcher to ensure that this icon
503 // at the bottom is not folded and faded away.
504 var touchStartX = launcherPanel.width / 2;
505 var touchEndY = launcherPanel.height / 2;
506 touchFlick(launcherPanel, touchStartX, 0, touchStartX, touchEndY);
507 tryCompare(launcherPanel, "moving", false);
508
509 tap(appIcon, appIcon.width / 2, appIcon.height / 2);501 tap(appIcon, appIcon.width / 2, appIcon.height / 2);
510 }502 }
511503
@@ -753,13 +745,17 @@
753 dragLauncherIntoView();745 dragLauncherIntoView();
754746
755 // Emulate a tap with a finger, where the touch position drifts during the tap.747 // Emulate a tap with a finger, where the touch position drifts during the tap.
748 // This is to test the touch ownership changes. The tap is happening on the button
749 // area but then drifting into the left edge drag area. This test makes sure
750 // the touch ownership stays with the button and doesn't move over to the
751 // left edge drag area.
756 {752 {
757 var buttonShowDashHome = findChild(launcher, "buttonShowDashHome");753 var buttonShowDashHome = findChild(launcher, "buttonShowDashHome");
758 var startPos = buttonShowDashHome.mapToItem(shell,754 var startPos = buttonShowDashHome.mapToItem(shell,
759 buttonShowDashHome.width * 0.2,755 buttonShowDashHome.width * 0.8,
760 buttonShowDashHome.height * 0.2);756 buttonShowDashHome.height * 0.2);
761 var endPos = buttonShowDashHome.mapToItem(shell,757 var endPos = buttonShowDashHome.mapToItem(shell,
762 buttonShowDashHome.width * 0.8,758 buttonShowDashHome.width * 0.2,
763 buttonShowDashHome.height * 0.8);759 buttonShowDashHome.height * 0.8);
764 touchFlick(shell, startPos.x, startPos.y, endPos.x, endPos.y);760 touchFlick(shell, startPos.x, startPos.y, endPos.x, endPos.y);
765 }761 }

Subscribers

People subscribed via source and target branches