Locked header does not work with conditional loading components
Bug #1424635 reported by
Arthur Mello
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
High
|
Tim Peeters | ||
Vivid |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Trying to use the flickable property to make the header locked does not work as expected with conditional loading components. The attached sample QML code shows the issue. On the first tab, where the component is directly loaded, the header is locked and working as expected. On the second one the flickable component seems to be drawn over the header. The problem seems to be gone if we change the window height.
Related branches
lp://staging/~tpeeters/ubuntu-ui-toolkit/tab-page-loader
- PS Jenkins bot: Approve (continuous-integration)
- Cris Dywan: Approve
-
Diff: 143 lines (+116/-1)3 files modifiedmodules/Ubuntu/Components/Page.qdoc (+6/-0)
modules/Ubuntu/Components/Page10.qml (+1/-1)
tests/unit_x11/tst_components/tst_page_size.qml (+109/-0)
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | New → In Progress |
assignee: | nobody → Tim Peeters (tpeeters) |
importance: | Undecided → High |
To post a comment you must log in.
I added some prints in our Page code. In Page10.qml (also valid for Page 1.1), I have this now:
// avoid using parent.height because parent may be a Loader which does not have its height set. headerHeight : undefined nged: print("height of "+page+" changed to "+parentNode. height+ " - "+internal. headerHeight+ " = "+height)
height: parentNode ? page.flickable ? parentNode.height : parentNode.height - internal.
onHeightCha
and this is being printed for the incorrect page:
qml: parent node of Page11_ QMLTYPE_ 35(0x2779620) = Tab_QMLTYPE_ 26(0x217f4f0) QMLTYPE_ 35(0x2779620) changed to 400 - 72 = 328 QMLTYPE_ 35(0x2779620) = Tab_QMLTYPE_ 26(0x217f4f0) QMLTYPE_ 35(0x2779620) changed to 400 - 72 = 400
qml: parent height = 400
qml: height of Page11_
qml: parent node of Page11_
qml: parent height = 400
qml: height of Page11_
so it seems that height is not updated, even though internal. headerHeight is correct here.