Pages hidden in an AdpativePageLayout stack have their width changed to zero
Bug #1492343 reported by
Andrew Hayzen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
High
|
Zsombor Egri |
Bug Description
As shown in this example [0], if you select the "Albums for artist" button to push a page onto the stack, you can see in the console that the width of the old component is changed to zero, which causes it then to reflow as the width is increased when it is brought back into view. Instead, the width should not be changed when the page is hidden.
Related branches
lp:~zsombi/ubuntu-ui-toolkit/aplMoreAsynchronous
- Zoltan Balogh: Approve
- PS Jenkins bot: Approve (continuous-integration)
- Cris Dywan: Pending requested
-
Diff: 477 lines (+258/-48)5 files modifiedexamples/ubuntu-ui-toolkit-gallery/About.qml (+81/-0)
examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml (+56/-14)
src/Ubuntu/Components/1.3/AdaptivePageLayout.qml (+44/-28)
src/Ubuntu/Components/1.3/PageWrapperUtils.js (+5/-6)
tests/unit_x11/tst_components/tst_adaptivepagelayout.qml (+72/-0)
Changed in ubuntu-ui-toolkit (Ubuntu): | |
assignee: | nobody → Zsombor Egri (zsombi) |
status: | In Progress → Fix Released |
To post a comment you must log in.
Internally the AdaptivePageLayout has an Item with id hiddenPages which is the parent for the Pages that were added but not visible. We did not set its anchors, that is why it is null. A quick fix to make its width not 0 is to make it fill its parent (the AdaptivePageLay out), but then still the width would change when a Page becomes hidden in a multi-column layout because the hidden pages would span the full width.
Basically, there is no fixed width that the parent of the hidden pages must have because the pages may go to different columns when they become visible.
Is there a way you can prevent the page from re-layouting when it is not visible?