AdaptivePageLayout doesn't allow hiding a Page header

Bug #1513003 reported by Michael Zanetti
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
ubuntu-ui-toolkit (Ubuntu)
Fix Released
High
Tim Peeters

Bug Description

Trying to port reminders-app to use an APL instead of my home-brew multicolumn thing, I noticed that it's no longer possible to hide a Page's header using:

head {
  visible: false
  locked: true
}

This was hiding the page header successfully with a PageStack, however, inside an AdaptivePageLayout it doesn't work any more.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

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

With the new PageHeader, it is possible to show/hide the header for each column individually. See the introduction here: https://developer.ubuntu.com/en/blog/2016/02/24/pageheader-tutorial/

Example code to show/hide the header:

import QtQuick 2.4
import Ubuntu.Components 1.3

MainView {
    width: units.gu(100)
    height: units.gu(70)

    AdaptivePageLayout {
        id: apl
        anchors.fill: parent
        primaryPage: page0

        Page {
            id: page0
            header: PageHeader { title: "aloha" }
            Button {
                anchors.centerIn: parent
                text: "add page -->"
                onClicked: apl.addPageToNextColumn(page0, page1)
            }
        }

        Page {
            id: page1
            header: PageHeader {
                title: "You can hide me"
                exposed: false
            }
            Switch {
                id: exposedSwitch
                anchors.centerIn: parent
                checked: page1.header.exposed
                onTriggered: page1.header.exposed = !page1.header.exposed
            }
            Label {
                anchors {
                    right: exposedSwitch.left
                    verticalCenter: exposedSwitch.verticalCenter
                }
                text: "Show header: "
            }
        }
    }
}

Changed in ubuntu-ui-toolkit (Ubuntu):
status: Confirmed → 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.