Merge lp:~dandrader/ubuntu-ui-toolkit/dontReparentPopup into lp:ubuntu-ui-toolkit/staging

Proposed by Daniel d'Andrada on 2014-11-20
Status: Merged
Approved by: Zsombor Egri on 2014-12-03
Approved revision: 1341
Merged at revision: 1362
Proposed branch: lp:~dandrader/ubuntu-ui-toolkit/dontReparentPopup
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 28 lines (+14/-3)
1 file modified
modules/Ubuntu/Components/Popups/PopupBase.qml (+14/-3)
To merge this branch: bzr merge lp:~dandrader/ubuntu-ui-toolkit/dontReparentPopup
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration 2014-11-20 Approve on 2014-12-03
Zsombor Egri 2014-11-20 Approve on 2014-12-03
Review via email:

This proposal supersedes a proposal from 2014-11-20.

Description of the change

This is needed by unity8 for the "shell rotation" feature (ie shell does all the rotation work instead of apps rotating themselves). unity8's dialogs (like the power dialog when you long press the power button) should follow its parent item rotation and size, as one would expect, and not be sneakily reparented to the scene root item, in which case the shell UI would be rotated but its dialog would not.

PPA with shell rotation:

And this is how unity8 is using Dialogs:

Related bug:

To post a comment you must log in.
1338. By Daniel d'Andrada on 2014-11-20

Added PopupBase.reparentToRootItem property

Some applications need Popups to behave as regular items and therefore
remain as children of their original parents (ie, no reparenting
to scene's root item behind the scenes).

This is the case when an application does its own UI rotation (which includes
any dialogs it might be displaying) where Popups should follow its parent
transformations (rotations) and resizes or when it doesn't want the Popup to cover
its entire scene.

PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
1339. By Daniel d'Andrada on 2014-11-27

Make it a hidden property

1340. By Daniel d'Andrada on 2014-11-27

Remove it from components.api

Zsombor Egri (zsombi) wrote :

The changes are good, we have a small problem in staging, let's get back to this when that is fixed.

1341. By Daniel d'Andrada on 2014-12-03

merge staging

Zsombor Egri (zsombi) wrote :

Looks good now, let's wait Jenkins.

review: Approve
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/Ubuntu/Components/Popups/PopupBase.qml'
2--- modules/Ubuntu/Components/Popups/PopupBase.qml 2014-11-25 15:39:38 +0000
3+++ modules/Ubuntu/Components/Popups/PopupBase.qml 2014-12-03 14:15:34 +0000
4@@ -66,11 +66,22 @@
5 to do it automatically.
6 */
7 function show() {
8- if (!dismissArea)
9- dismissArea = stateWrapper.rootItem
11+ if ((typeof popupBase["reparentToRootItem"]) === "boolean") {
12+ // So the property exists. Let's use it then.
13+ if (reparentToRootItem) {
14+ parent = stateWrapper.rootItem;
15+ }
16+ } else {
17+ // The property does not exist. Default is to reparent
18+ parent = stateWrapper.rootItem;
19+ }
21+ if (!dismissArea) {
22+ dismissArea = parent
23+ }
25 // Without setting the parent, mapFromItem() breaks in internalPopupUtils.
26- parent = stateWrapper.rootItem;
27 stateWrapper.state = 'opened';
28 }


People subscribed via source and target branches