Merge lp:~aacid/unity8/launcher_touch_menu_interaction into lp:unity8
- launcher_touch_menu_interaction
- Merge into trunk
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Lukáš Tinkl | ||||||||
Approved revision: | 2851 | ||||||||
Merged at revision: | 2888 | ||||||||
Proposed branch: | lp:~aacid/unity8/launcher_touch_menu_interaction | ||||||||
Merge into: | lp:unity8 | ||||||||
Prerequisite: | lp:~aacid/unity8/disabledMenus | ||||||||
Diff against target: |
395 lines (+140/-60) 7 files modified
qml/Panel/Panel.qml (+26/-2) qml/Panel/PanelBar.qml (+1/-2) qml/Panel/PanelItemRow.qml (+3/-23) qml/Panel/PanelMenu.qml (+35/-24) qml/Shell.qml (+9/-1) tests/qmltests/Panel/tst_Panel.qml (+10/-7) tests/qmltests/tst_Shell.qml (+56/-1) |
||||||||
To merge this branch: | bzr merge lp:~aacid/unity8/launcher_touch_menu_interaction | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Lukáš Tinkl (community) | Approve | ||
Unity8 CI Bot | continuous-integration | Approve | |
Michael Zanetti | Pending | ||
Review via email: mp+320078@code.launchpad.net |
This proposal supersedes a proposal from 2017-03-08.
Commit message
Improve Launcher ←→ touch menu interaction
Needs to move the label from PanelItemRow to Panel because how clipping works in those items (and fixes some other problems too)
If launcher is locked visible:
* Touch menus show shifted to the right to not overlap
* Showing the app drawer closes the touch menus
* Showing the touch menus closes the app drawer
If launcher is not locked visible:
* Showing the launcher closes the touch menus
* Showing the touch menus closes the launcher
Description of the change
Prereq-archive: ppa:ci-
* Are there any related MPs required for this MP to build/function as expected?
No
* Did you perform an exploratory manual test run of your code change and any related functionality?
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
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:2841
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal | # |
2 small inline comments.
Wouldn't mind a test that runs once with launcher.
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal | # |
I've tested it, seems it's working fine.
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:2842
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2844
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal | # |
looks like the new test fails in CI
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2844
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2845
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:2845
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:2846
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal | # |
Not entirely sure yet, but I think this branch breaks the panel window title for apps that don't have menus at all - like browser here: https:/
Notice the text being cut from both sides
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal | # |
Wonder what's going on here, it seems that it happens only with the browser app? :/
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2847
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal | # |
Tests have regressed a bit
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2848
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal | # |
> Tests have regressed a bit
Should be fixed with r2849.
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:2849
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2850
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2850
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Lukáš Tinkl (lukas-kde) wrote : | # |
* 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.
Waiting, triggered a new CI run
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2850
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2850
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2850
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2850
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 2851. By Albert Astals Cid
-
Fix tests?
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:2851
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Lukáš Tinkl (lukas-kde) wrote : | # |
CI is green, top approving
Preview Diff
1 | === modified file 'qml/Panel/Panel.qml' | |||
2 | --- qml/Panel/Panel.qml 2017-03-17 13:44:53 +0000 | |||
3 | +++ qml/Panel/Panel.qml 2017-03-17 13:44:53 +0000 | |||
4 | @@ -38,6 +38,7 @@ | |||
5 | 38 | property real expandedPanelHeight: units.gu(7) | 38 | property real expandedPanelHeight: units.gu(7) |
6 | 39 | property real indicatorMenuWidth: width | 39 | property real indicatorMenuWidth: width |
7 | 40 | property real applicationMenuWidth: width | 40 | property real applicationMenuWidth: width |
8 | 41 | property alias applicationMenuContentX: __applicationMenus.menuContentX | ||
9 | 41 | 42 | ||
10 | 42 | property alias applicationMenus: __applicationMenus | 43 | property alias applicationMenus: __applicationMenus |
11 | 43 | property alias indicators: __indicators | 44 | property alias indicators: __indicators |
12 | @@ -250,6 +251,7 @@ | |||
13 | 250 | PanelMenu { | 251 | PanelMenu { |
14 | 251 | id: __applicationMenus | 252 | id: __applicationMenus |
15 | 252 | 253 | ||
16 | 254 | x: menuContentX | ||
17 | 253 | model: registeredMenuModel.model | 255 | model: registeredMenuModel.model |
18 | 254 | width: root.applicationMenuWidth | 256 | width: root.applicationMenuWidth |
19 | 255 | minimizedPanelHeight: root.minimizedPanelHeight | 257 | minimizedPanelHeight: root.minimizedPanelHeight |
20 | @@ -258,6 +260,7 @@ | |||
21 | 258 | alignment: Qt.AlignLeft | 260 | alignment: Qt.AlignLeft |
22 | 259 | enableHint: !callHint.active && !fullscreenMode | 261 | enableHint: !callHint.active && !fullscreenMode |
23 | 260 | showOnClick: false | 262 | showOnClick: false |
24 | 263 | adjustDragHandleSizeToContents: false | ||
25 | 261 | panelColor: panelAreaBackground.color | 264 | panelColor: panelAreaBackground.color |
26 | 262 | 265 | ||
27 | 263 | onShowTapped: { | 266 | onShowTapped: { |
28 | @@ -266,8 +269,7 @@ | |||
29 | 266 | } | 269 | } |
30 | 267 | } | 270 | } |
31 | 268 | 271 | ||
34 | 269 | showRowTitle: !expanded | 272 | hideRow: !expanded |
33 | 270 | rowTitle: PanelState.title | ||
35 | 271 | rowItemDelegate: ActionItem { | 273 | rowItemDelegate: ActionItem { |
36 | 272 | id: actionItem | 274 | id: actionItem |
37 | 273 | property int ownIndex: index | 275 | property int ownIndex: index |
38 | @@ -316,6 +318,28 @@ | |||
39 | 316 | } | 318 | } |
40 | 317 | } | 319 | } |
41 | 318 | 320 | ||
42 | 321 | Label { | ||
43 | 322 | id: rowLabel | ||
44 | 323 | objectName: "panelTitle" | ||
45 | 324 | anchors { | ||
46 | 325 | left: parent.left | ||
47 | 326 | leftMargin: units.gu(1) | ||
48 | 327 | right: __indicators.left | ||
49 | 328 | rightMargin: units.gu(1) | ||
50 | 329 | } | ||
51 | 330 | height: root.minimizedPanelHeight | ||
52 | 331 | verticalAlignment: Text.AlignVCenter | ||
53 | 332 | elide: Text.ElideRight | ||
54 | 333 | maximumLineCount: 1 | ||
55 | 334 | fontSize: "medium" | ||
56 | 335 | font.weight: Font.Medium | ||
57 | 336 | color: Theme.palette.selected.backgroundText | ||
58 | 337 | opacity: __applicationMenus.visible && !__applicationMenus.expanded ? 1 : 0 | ||
59 | 338 | visible: opacity != 0 | ||
60 | 339 | Behavior on opacity { NumberAnimation { duration: UbuntuAnimation.SnapDuration } } | ||
61 | 340 | text: PanelState.title | ||
62 | 341 | } | ||
63 | 342 | |||
64 | 319 | PanelMenu { | 343 | PanelMenu { |
65 | 320 | id: __indicators | 344 | id: __indicators |
66 | 321 | objectName: "indicators" | 345 | objectName: "indicators" |
67 | 322 | 346 | ||
68 | === modified file 'qml/Panel/PanelBar.qml' | |||
69 | --- qml/Panel/PanelBar.qml 2017-03-17 13:44:53 +0000 | |||
70 | +++ qml/Panel/PanelBar.qml 2017-03-17 13:44:53 +0000 | |||
71 | @@ -30,8 +30,7 @@ | |||
72 | 30 | property real lateralPosition: -1 | 30 | property real lateralPosition: -1 |
73 | 31 | property int alignment: Qt.AlignRight | 31 | property int alignment: Qt.AlignRight |
74 | 32 | 32 | ||
77 | 33 | property alias showRowTitle: row.showRowTitle | 33 | property alias hideRow: row.hideRow |
76 | 34 | property alias rowTitle: row.rowTitle | ||
78 | 35 | property alias rowItemDelegate: row.delegate | 34 | property alias rowItemDelegate: row.delegate |
79 | 36 | 35 | ||
80 | 37 | implicitWidth: flickable.contentWidth | 36 | implicitWidth: flickable.contentWidth |
81 | 38 | 37 | ||
82 | === modified file 'qml/Panel/PanelItemRow.qml' | |||
83 | --- qml/Panel/PanelItemRow.qml 2017-03-17 13:44:53 +0000 | |||
84 | +++ qml/Panel/PanelItemRow.qml 2017-03-17 13:44:53 +0000 | |||
85 | @@ -20,11 +20,10 @@ | |||
86 | 20 | 20 | ||
87 | 21 | Item { | 21 | Item { |
88 | 22 | id: root | 22 | id: root |
90 | 23 | implicitWidth: showRowTitle && !expanded ? rowTitle != "" ? rowLabel.width : 0 : row.width | 23 | implicitWidth: row.width |
91 | 24 | implicitHeight: units.gu(3) | 24 | implicitHeight: units.gu(3) |
92 | 25 | 25 | ||
95 | 26 | property bool showRowTitle: false | 26 | property bool hideRow: false |
94 | 27 | property alias rowTitle: rowLabel.text | ||
96 | 28 | property QtObject model: null | 27 | property QtObject model: null |
97 | 29 | property real overFlowWidth: width | 28 | property real overFlowWidth: width |
98 | 30 | property bool expanded: false | 29 | property bool expanded: false |
99 | @@ -164,31 +163,12 @@ | |||
100 | 164 | d.previousItem = currentItem; | 163 | d.previousItem = currentItem; |
101 | 165 | } | 164 | } |
102 | 166 | 165 | ||
103 | 167 | Label { | ||
104 | 168 | id: rowLabel | ||
105 | 169 | objectName: "panelTitle" | ||
106 | 170 | anchors { | ||
107 | 171 | left: parent.left | ||
108 | 172 | leftMargin: units.gu(1) | ||
109 | 173 | verticalCenter: parent.verticalCenter | ||
110 | 174 | } | ||
111 | 175 | width: implicitWidth + units.gu(2) | ||
112 | 176 | elide: Text.ElideRight | ||
113 | 177 | maximumLineCount: 1 | ||
114 | 178 | fontSize: "medium" | ||
115 | 179 | font.weight: Font.Medium | ||
116 | 180 | color: Theme.palette.selected.backgroundText | ||
117 | 181 | opacity: showRowTitle ? 1 : 0 | ||
118 | 182 | visible: opacity != 0 | ||
119 | 183 | Behavior on opacity { NumberAnimation { duration: UbuntuAnimation.SnapDuration } } | ||
120 | 184 | } | ||
121 | 185 | |||
122 | 186 | ListView { | 166 | ListView { |
123 | 187 | id: row | 167 | id: row |
124 | 188 | objectName: "panelRow" | 168 | objectName: "panelRow" |
125 | 189 | orientation: ListView.Horizontal | 169 | orientation: ListView.Horizontal |
126 | 190 | model: root.model | 170 | model: root.model |
128 | 191 | opacity: showRowTitle ? 0 : 1 | 171 | opacity: hideRow ? 0 : 1 |
129 | 192 | // dont set visible on basis of opacity; otherwise width will not be calculated correctly | 172 | // dont set visible on basis of opacity; otherwise width will not be calculated correctly |
130 | 193 | anchors { | 173 | anchors { |
131 | 194 | top: parent.top | 174 | top: parent.top |
132 | 195 | 175 | ||
133 | === modified file 'qml/Panel/PanelMenu.qml' | |||
134 | --- qml/Panel/PanelMenu.qml 2017-03-17 13:44:53 +0000 | |||
135 | +++ qml/Panel/PanelMenu.qml 2017-03-17 13:44:53 +0000 | |||
136 | @@ -32,11 +32,12 @@ | |||
137 | 32 | property real openedHeight: units.gu(71) | 32 | property real openedHeight: units.gu(71) |
138 | 33 | property bool enableHint: true | 33 | property bool enableHint: true |
139 | 34 | property bool showOnClick: true | 34 | property bool showOnClick: true |
140 | 35 | property bool adjustDragHandleSizeToContents: true | ||
141 | 35 | property color panelColor: theme.palette.normal.background | 36 | property color panelColor: theme.palette.normal.background |
142 | 37 | property real menuContentX: 0 | ||
143 | 36 | 38 | ||
144 | 37 | property alias alignment: bar.alignment | 39 | property alias alignment: bar.alignment |
147 | 38 | property alias rowTitle: bar.rowTitle | 40 | property alias hideRow: bar.hideRow |
146 | 39 | property alias showRowTitle: bar.showRowTitle | ||
148 | 40 | property alias rowItemDelegate: bar.rowItemDelegate | 41 | property alias rowItemDelegate: bar.rowItemDelegate |
149 | 41 | property alias pageDelegate: content.pageDelegate | 42 | property alias pageDelegate: content.pageDelegate |
150 | 42 | 43 | ||
151 | @@ -45,7 +46,7 @@ | |||
152 | 45 | readonly property bool partiallyOpened: unitProgress > 0 && unitProgress < 1.0 | 46 | readonly property bool partiallyOpened: unitProgress > 0 && unitProgress < 1.0 |
153 | 46 | readonly property bool fullyClosed: unitProgress == 0 | 47 | readonly property bool fullyClosed: unitProgress == 0 |
154 | 47 | readonly property alias expanded: bar.expanded | 48 | readonly property alias expanded: bar.expanded |
156 | 48 | readonly property int barWidth: Math.min(bar.width, bar.implicitWidth) | 49 | readonly property int barWidth: adjustDragHandleSizeToContents ? Math.min(bar.width, bar.implicitWidth) : bar.width |
157 | 49 | readonly property alias currentMenuIndex: bar.currentItemIndex | 50 | readonly property alias currentMenuIndex: bar.currentItemIndex |
158 | 50 | 51 | ||
159 | 51 | signal showTapped() | 52 | signal showTapped() |
160 | @@ -78,33 +79,42 @@ | |||
161 | 78 | 79 | ||
162 | 79 | shown: false | 80 | shown: false |
163 | 80 | height: minimizedPanelHeight | 81 | height: minimizedPanelHeight |
164 | 81 | clip: root.partiallyOpened | ||
165 | 82 | 82 | ||
166 | 83 | onUnitProgressChanged: d.updateState() | 83 | onUnitProgressChanged: d.updateState() |
167 | 84 | 84 | ||
182 | 85 | // eater | 85 | Item { |
169 | 86 | MouseArea { | ||
170 | 87 | anchors.fill: content | ||
171 | 88 | hoverEnabled: true | ||
172 | 89 | acceptedButtons: Qt.AllButtons | ||
173 | 90 | onWheel: wheel.accepted = true; | ||
174 | 91 | enabled: root.state != "initial" | ||
175 | 92 | visible: content.visible | ||
176 | 93 | } | ||
177 | 94 | |||
178 | 95 | MenuContent { | ||
179 | 96 | id: content | ||
180 | 97 | objectName: "menuContent" | ||
181 | 98 | |||
183 | 99 | anchors { | 86 | anchors { |
184 | 100 | left: parent.left | 87 | left: parent.left |
185 | 101 | right: parent.right | 88 | right: parent.right |
186 | 102 | top: bar.bottom | 89 | top: bar.bottom |
192 | 103 | } | 90 | bottom: parent.bottom |
193 | 104 | height: openedHeight - bar.height - handle.height | 91 | } |
194 | 105 | model: root.model | 92 | clip: root.partiallyOpened |
195 | 106 | visible: root.unitProgress > 0 | 93 | |
196 | 107 | currentMenuIndex: bar.currentItemIndex | 94 | // eater |
197 | 95 | MouseArea { | ||
198 | 96 | anchors.fill: content | ||
199 | 97 | hoverEnabled: true | ||
200 | 98 | acceptedButtons: Qt.AllButtons | ||
201 | 99 | onWheel: wheel.accepted = true; | ||
202 | 100 | enabled: root.state != "initial" | ||
203 | 101 | visible: content.visible | ||
204 | 102 | } | ||
205 | 103 | |||
206 | 104 | MenuContent { | ||
207 | 105 | id: content | ||
208 | 106 | objectName: "menuContent" | ||
209 | 107 | |||
210 | 108 | anchors { | ||
211 | 109 | left: parent.left | ||
212 | 110 | right: parent.right | ||
213 | 111 | top: parent.top | ||
214 | 112 | } | ||
215 | 113 | height: openedHeight - bar.height - handle.height | ||
216 | 114 | model: root.model | ||
217 | 115 | visible: root.unitProgress > 0 | ||
218 | 116 | currentMenuIndex: bar.currentItemIndex | ||
219 | 117 | } | ||
220 | 108 | } | 118 | } |
221 | 109 | 119 | ||
222 | 110 | Handle { | 120 | Handle { |
223 | @@ -218,8 +228,9 @@ | |||
224 | 218 | objectName: "showDragHandle" | 228 | objectName: "showDragHandle" |
225 | 219 | anchors.bottom: parent.bottom | 229 | anchors.bottom: parent.bottom |
226 | 220 | anchors.left: alignment == Qt.AlignLeft ? parent.left : undefined | 230 | anchors.left: alignment == Qt.AlignLeft ? parent.left : undefined |
227 | 231 | anchors.leftMargin: -root.menuContentX | ||
228 | 221 | anchors.right: alignment == Qt.AlignRight ? parent.right : undefined | 232 | anchors.right: alignment == Qt.AlignRight ? parent.right : undefined |
230 | 222 | width: root.barWidth // show handle should only cover panel items. | 233 | width: root.barWidth + root.menuContentX // show handle should only cover panel items. |
231 | 223 | height: minimizedPanelHeight | 234 | height: minimizedPanelHeight |
232 | 224 | direction: Direction.Downwards | 235 | direction: Direction.Downwards |
233 | 225 | enabled: !root.shown && root.available | 236 | enabled: !root.shown && root.available |
234 | 226 | 237 | ||
235 | === modified file 'qml/Shell.qml' | |||
236 | --- qml/Shell.qml 2017-02-21 16:21:34 +0000 | |||
237 | +++ qml/Shell.qml 2017-03-17 13:44:53 +0000 | |||
238 | @@ -500,6 +500,7 @@ | |||
239 | 500 | expandedPanelHeight: units.gu(7) | 500 | expandedPanelHeight: units.gu(7) |
240 | 501 | indicatorMenuWidth: parent.width > units.gu(60) ? units.gu(40) : parent.width | 501 | indicatorMenuWidth: parent.width > units.gu(60) ? units.gu(40) : parent.width |
241 | 502 | applicationMenuWidth: parent.width > units.gu(60) ? units.gu(40) : parent.width | 502 | applicationMenuWidth: parent.width > units.gu(60) ? units.gu(40) : parent.width |
242 | 503 | applicationMenuContentX: launcher.lockedVisible ? launcher.panelWidth : 0 | ||
243 | 503 | 504 | ||
244 | 504 | indicators { | 505 | indicators { |
245 | 505 | hides: [launcher] | 506 | hides: [launcher] |
246 | @@ -567,7 +568,14 @@ | |||
247 | 567 | } | 568 | } |
248 | 568 | onShownChanged: { | 569 | onShownChanged: { |
249 | 569 | if (shown) { | 570 | if (shown) { |
251 | 570 | panel.indicators.hide() | 571 | panel.indicators.hide(); |
252 | 572 | panel.applicationMenus.hide(); | ||
253 | 573 | } | ||
254 | 574 | } | ||
255 | 575 | onDrawerShownChanged: { | ||
256 | 576 | if (drawerShown) { | ||
257 | 577 | panel.indicators.hide(); | ||
258 | 578 | panel.applicationMenus.hide(); | ||
259 | 571 | } | 579 | } |
260 | 572 | } | 580 | } |
261 | 573 | onFocusChanged: { | 581 | onFocusChanged: { |
262 | 574 | 582 | ||
263 | === modified file 'tests/qmltests/Panel/tst_Panel.qml' | |||
264 | --- tests/qmltests/Panel/tst_Panel.qml 2017-03-17 13:44:53 +0000 | |||
265 | +++ tests/qmltests/Panel/tst_Panel.qml 2017-03-17 13:44:53 +0000 | |||
266 | @@ -320,12 +320,15 @@ | |||
267 | 320 | tryCompare(panel.indicators, "fullyOpened", true); | 320 | tryCompare(panel.indicators, "fullyOpened", true); |
268 | 321 | } | 321 | } |
269 | 322 | 322 | ||
271 | 323 | function pullDownApplicationsMenu() { | 323 | function pullDownApplicationsMenu(xPos) { |
272 | 324 | var showDragHandle = findChild(panel.applicationMenus, "showDragHandle"); | 324 | var showDragHandle = findChild(panel.applicationMenus, "showDragHandle"); |
273 | 325 | if (xPos === undefined) { | ||
274 | 326 | xPos = showDragHandle.width / 2; | ||
275 | 327 | } | ||
276 | 325 | touchFlick(showDragHandle, | 328 | touchFlick(showDragHandle, |
278 | 326 | showDragHandle.width / 2, | 329 | xPos, |
279 | 327 | showDragHandle.height / 2, | 330 | showDragHandle.height / 2, |
281 | 328 | showDragHandle.width / 2, | 331 | xPos, |
282 | 329 | showDragHandle.height / 2 + (showDragHandle.autoCompleteDragThreshold * 1.1)); | 332 | showDragHandle.height / 2 + (showDragHandle.autoCompleteDragThreshold * 1.1)); |
283 | 330 | tryCompare(panel.applicationMenus, "fullyOpened", true); | 333 | tryCompare(panel.applicationMenus, "fullyOpened", true); |
284 | 331 | } | 334 | } |
285 | @@ -774,7 +777,7 @@ | |||
286 | 774 | panel.mode = "staged"; | 777 | panel.mode = "staged"; |
287 | 775 | mouseEmulation.checked = false; | 778 | mouseEmulation.checked = false; |
288 | 776 | 779 | ||
290 | 777 | var appTitle = findChild(panel.applicationMenus, "panelTitle"); verify(appTitle); | 780 | var appTitle = findChild(panel, "panelTitle"); verify(appTitle); |
291 | 778 | var appMenuRow = findChild(panel.applicationMenus, "panelRow"); verify(appMenuRow); | 781 | var appMenuRow = findChild(panel.applicationMenus, "panelRow"); verify(appMenuRow); |
292 | 779 | var appMenuBar = findChild(panel, "menuBar"); verify(appMenuBar); | 782 | var appMenuBar = findChild(panel, "menuBar"); verify(appMenuBar); |
293 | 780 | 783 | ||
294 | @@ -792,7 +795,7 @@ | |||
295 | 792 | panel.mode = "windowed"; | 795 | panel.mode = "windowed"; |
296 | 793 | mouseEmulation.checked = false; | 796 | mouseEmulation.checked = false; |
297 | 794 | 797 | ||
299 | 795 | var appTitle = findChild(panel.applicationMenus, "panelTitle"); verify(appTitle); | 798 | var appTitle = findChild(panel, "panelTitle"); verify(appTitle); |
300 | 796 | var appMenuRow = findChild(panel.applicationMenus, "panelRow"); verify(appMenuRow); | 799 | var appMenuRow = findChild(panel.applicationMenus, "panelRow"); verify(appMenuRow); |
301 | 797 | var appMenuBar = findChild(panel, "menuBar"); verify(appMenuBar); | 800 | var appMenuBar = findChild(panel, "menuBar"); verify(appMenuBar); |
302 | 798 | 801 | ||
303 | @@ -853,7 +856,7 @@ | |||
304 | 853 | var indicatorsBar = findChild(panel.applicationMenus, "indicatorsBar"); | 856 | var indicatorsBar = findChild(panel.applicationMenus, "indicatorsBar"); |
305 | 854 | 857 | ||
306 | 855 | PanelState.title = "Fake Title" | 858 | PanelState.title = "Fake Title" |
308 | 856 | pullDownApplicationsMenu(); | 859 | pullDownApplicationsMenu(0 /*xPos*/); |
309 | 857 | compare(aboutToShowCalledSpy.count, 1); | 860 | compare(aboutToShowCalledSpy.count, 1); |
310 | 858 | 861 | ||
311 | 859 | keyClick(Qt.Key_Right); | 862 | keyClick(Qt.Key_Right); |
312 | @@ -886,7 +889,7 @@ | |||
313 | 886 | var indicatorsBar = findChild(panel.applicationMenus, "indicatorsBar"); | 889 | var indicatorsBar = findChild(panel.applicationMenus, "indicatorsBar"); |
314 | 887 | 890 | ||
315 | 888 | PanelState.title = "Fake Title" | 891 | PanelState.title = "Fake Title" |
317 | 889 | pullDownApplicationsMenu(); | 892 | pullDownApplicationsMenu(0 /*xPos*/); |
318 | 890 | 893 | ||
319 | 891 | tryCompare(indicatorsBar, "currentItemIndex", 0); | 894 | tryCompare(indicatorsBar, "currentItemIndex", 0); |
320 | 892 | 895 | ||
321 | 893 | 896 | ||
322 | === modified file 'tests/qmltests/tst_Shell.qml' | |||
323 | --- tests/qmltests/tst_Shell.qml 2017-03-08 09:54:00 +0000 | |||
324 | +++ tests/qmltests/tst_Shell.qml 2017-03-17 13:44:53 +0000 | |||
325 | @@ -2848,7 +2848,7 @@ | |||
326 | 2848 | loadShell(data.tag); | 2848 | loadShell(data.tag); |
327 | 2849 | 2849 | ||
328 | 2850 | var panel = findChild(shell, "panel"); verify(panel); | 2850 | var panel = findChild(shell, "panel"); verify(panel); |
330 | 2851 | var panelTitle = findChild(panel.applicationMenus, "panelTitle"); verify(panelTitle); | 2851 | var panelTitle = findChild(panel, "panelTitle"); verify(panelTitle); |
331 | 2852 | compare(panelTitle.visible, false, "Panel title should not be visible when greeter is shown"); | 2852 | compare(panelTitle.visible, false, "Panel title should not be visible when greeter is shown"); |
332 | 2853 | 2853 | ||
333 | 2854 | swipeAwayGreeter(); | 2854 | swipeAwayGreeter(); |
334 | @@ -2941,6 +2941,61 @@ | |||
335 | 2941 | tryCompare(topLevelSurfaceList.applicationAt(0), "appId", "dialer-app"); | 2941 | tryCompare(topLevelSurfaceList.applicationAt(0), "appId", "dialer-app"); |
336 | 2942 | } | 2942 | } |
337 | 2943 | 2943 | ||
338 | 2944 | function test_touchMenuPosition_data() { | ||
339 | 2945 | return [ | ||
340 | 2946 | { tag: "launcher locked", lockLauncher: true }, | ||
341 | 2947 | { tag: "launcher not locked", lockLauncher: false } | ||
342 | 2948 | ]; | ||
343 | 2949 | } | ||
344 | 2950 | |||
345 | 2951 | function test_touchMenuPosition(data) { | ||
346 | 2952 | loadShell("desktop"); | ||
347 | 2953 | shell.usageScenario = "desktop"; | ||
348 | 2954 | waitForRendering(shell); | ||
349 | 2955 | swipeAwayGreeter(); | ||
350 | 2956 | |||
351 | 2957 | var panel = findChild(shell, "panel"); | ||
352 | 2958 | var launcher = testCase.findChild(shell, "launcher"); | ||
353 | 2959 | launcher.lockedVisible = data.lockLauncher; | ||
354 | 2960 | if (data.lockLauncher) { | ||
355 | 2961 | compare(panel.applicationMenus.x, launcher.panelWidth); | ||
356 | 2962 | } else { | ||
357 | 2963 | compare(panel.applicationMenus.x, 0); | ||
358 | 2964 | } | ||
359 | 2965 | } | ||
360 | 2966 | |||
361 | 2967 | function test_touchMenuHidesOnLauncherAppDrawer_data() { | ||
362 | 2968 | return [ | ||
363 | 2969 | { tag: "launcher locked", lockLauncher: true }, | ||
364 | 2970 | { tag: "launcher not locked", lockLauncher: false } | ||
365 | 2971 | ]; | ||
366 | 2972 | } | ||
367 | 2973 | |||
368 | 2974 | function test_touchMenuHidesOnLauncherAppDrawer(data) { | ||
369 | 2975 | loadShell("desktop"); | ||
370 | 2976 | shell.usageScenario = "desktop"; | ||
371 | 2977 | waitForRendering(shell); | ||
372 | 2978 | swipeAwayGreeter(); | ||
373 | 2979 | |||
374 | 2980 | var panel = findChild(shell, "panel"); | ||
375 | 2981 | var launcher = testCase.findChild(shell, "launcher"); | ||
376 | 2982 | launcher.lockedVisible = data.lockLauncher; | ||
377 | 2983 | |||
378 | 2984 | waitForRendering(panel.applicationMenus); | ||
379 | 2985 | |||
380 | 2986 | if (data.lockLauncher) { | ||
381 | 2987 | panel.applicationMenus.show(); | ||
382 | 2988 | tryCompare(panel.applicationMenus, "fullyOpened", true); | ||
383 | 2989 | launcher.openDrawer(); | ||
384 | 2990 | } else { | ||
385 | 2991 | tryCompare(launcher, "shown", false); | ||
386 | 2992 | panel.applicationMenus.show(); | ||
387 | 2993 | tryCompare(panel.applicationMenus, "fullyOpened", true); | ||
388 | 2994 | launcher.switchToNextState("visible"); | ||
389 | 2995 | } | ||
390 | 2996 | tryCompare(panel.applicationMenus, "fullyClosed", true); | ||
391 | 2997 | } | ||
392 | 2998 | |||
393 | 2944 | function test_doubleClickPanelRestoresWindow() { | 2999 | function test_doubleClickPanelRestoresWindow() { |
394 | 2945 | loadShell("desktop"); | 3000 | loadShell("desktop"); |
395 | 2946 | shell.usageScenario = "desktop"; | 3001 | shell.usageScenario = "desktop"; |
FAILED: Continuous integration, rev:2840 /unity8- jenkins. ubuntu. com/job/ lp-unity8- ci/3312/ /unity8- jenkins. ubuntu. com/job/ build/4360 /unity8- jenkins. ubuntu. com/job/ test-0- autopkgtest/ label=amd64, release= xenial+ overlay, testname= qmluitests. sh/2606 /unity8- jenkins. ubuntu. com/job/ test-0- autopkgtest/ label=amd64, release= zesty,testname= qmluitests. sh/2606 /unity8- jenkins. ubuntu. com/job/ build-0- fetch/4388 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 4221 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 4221/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= zesty/4221 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= zesty/4221/ artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 4221 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 4221/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= zesty/4221 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= zesty/4221/ artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 4221 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 4221/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= zesty/4221 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= zesty/4221/ artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /unity8- jenkins. ubuntu. com/job/ lp-unity8- ci/3312/ rebuild
https:/