[PageStack] Pages does not get correct anchored in the PageStack area

Bug #1349366 reported by Renato Araujo Oliveira Filho on 2014-07-28
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu UI Toolkit
Fix Released
Critical
Tim Peeters
ubuntu-ui-toolkit (Ubuntu)
Undecided
Unassigned
Vivid
Undecided
Unassigned

Bug Description

Pages does not get correct anchored in a PageStack.

For example this code, causes the MyPage to overlaps the red rectangle.

OBS: PageStack is anchored on the top of the Rectangle, the MyPage should not overlap it.

import QtQuick 2.0
import Ubuntu.Components 1.1

MainView {
    id: mainView

    width: units.gu(40)
    height: units.gu(71)
    anchorToKeyboard: true

    PageStack {
         id: mainStack
        anchors { left: parent.left; right: parent.right; top: parent.top; bottom: rect.top}
    }

    Rectangle {
        id: rect
        color: "red"
        anchors { left: parent.left; right: parent.right; bottom: parent.bottom; }
        height: units.gu(10)
    }

    Component.onCompleted: mainStack.push(Qt.resolvedUrl("MyPage.qml"))
}

Related branches

Tim Peeters (tpeeters) on 2014-07-28
Changed in ubuntu-ui-toolkit:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Tim Peeters (tpeeters)
importance: Medium → High
Tim Peeters (tpeeters) wrote :

This breaks MainView.anchorToKeyboard when there is a PageStack in the MainView.

Changed in ubuntu-ui-toolkit:
importance: High → Critical
Tim Peeters (tpeeters) wrote :

Renato has a workaround in messaging(?) app that wraps the PageStack inside an Item and then it seems to work.

Bill Filler (bfiller) on 2014-08-11
tags: added: rtm14
Tim Peeters (tpeeters) on 2014-08-12
Changed in ubuntu-ui-toolkit:
status: Confirmed → In Progress
Tim Peeters (tpeeters) wrote :

anchors.fill of PageStack is set to fill its parent by default. If you set anchors.fill of the PageStack to undefined, the example above works. This was not documented, I linked an MR that documents the default anchors of the PageStack.

PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:ubuntu-ui-toolkit/staging at revision None, scheduled for release in ubuntu-ui-toolkit, milestone Unknown

Changed in ubuntu-ui-toolkit:
status: In Progress → Fix Committed
Tim Peeters (tpeeters) on 2014-09-04
Changed in ubuntu-ui-toolkit:
status: Fix Committed → Fix Released
Zsombor Egri (zsombi) on 2015-07-14
Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers