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

Bug #1349366 reported by Renato Araujo Oliveira Filho
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu UI Toolkit
Fix Released
Critical
Tim Peeters
ubuntu-ui-toolkit (Ubuntu)
Fix Released
Undecided
Unassigned
Vivid
New
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"))
}

Tags: rtm14

Related branches

Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Tim Peeters (tpeeters)
importance: Medium → High
Revision history for this message
Tim Peeters (tpeeters) wrote :

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

Changed in ubuntu-ui-toolkit:
importance: High → Critical
Revision history for this message
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)
tags: added: rtm14
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
status: Confirmed → In Progress
Revision history for this message
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.

Revision history for this message
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)
Changed in ubuntu-ui-toolkit:
status: Fix Committed → Fix Released
Zsombor Egri (zsombi)
Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.