~ubuntu-sdk-team/ubuntu-ui-toolkit/kickLocaleTemplate

« back to all changes in this revision

Viewing changes to examples/ubuntu-ui-toolkit-gallery/Template.qml

  • Committer: Tarmac
  • Author(s): Tim Peeters
  • Date: 2015-10-23 18:15:19 UTC
  • mfrom: (1700.3.5 90-gallery-PageHeader)
  • Revision ID: tarmac-20151023181519-8vyg404rfr08adxv
Use PageHeader in the UITK gallery.

Approved by Zsombor Egri, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
Page {
21
21
    id: template
22
22
 
23
 
    default property alias content: layout.children
24
 
    property alias spacing: layout.spacing
 
23
    default property alias content: column.children
 
24
    property alias spacing: column.spacing
 
25
 
 
26
    header: PageHeader {
 
27
        title: template.title
 
28
        flickable: layout.columns === 1 ? flickable : null
 
29
        onFlickableChanged: exposed = true;
 
30
    }
25
31
 
26
32
    Flickable {
27
33
        id: flickable
28
34
        objectName: "TemplateFlickable"
29
 
        anchors.fill: parent
30
 
        anchors.topMargin: units.gu(2)
31
 
        anchors.bottomMargin: units.gu(2)
32
 
        contentHeight: layout.height
 
35
        anchors {
 
36
            fill: parent
 
37
            topMargin: template.header.flickable ? units.gu(2) :
 
38
                                                   units.gu(2) + template.header.height
 
39
            bottomMargin: units.gu(2)
 
40
        }
 
41
        contentHeight: column.height
33
42
        interactive: contentHeight > height
34
43
 
35
44
        Column {
36
 
            id: layout
 
45
            id: column
37
46
            spacing: units.gu(6)
38
47
            anchors.left: parent.left
39
48
            anchors.right: parent.right