~zsombi/ubuntu-ui-toolkit/labelThemingFix

« back to all changes in this revision

Viewing changes to tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_sections.SectionsTestCase.qml

  • Committer: Tarmac
  • Author(s): Tim Peeters
  • Date: 2016-02-26 11:38:24 UTC
  • mfrom: (1732.9.66 60-scectionScrolling)
  • Revision ID: tarmac-20160226113824-68ud6a1kcgsy7ha3
Sections scrolling and keyboard navigation. Fixes: https://bugs.launchpad.net/bugs/1465048, https://bugs.launchpad.net/bugs/1489591.

Approved by ubuntu-sdk-build-bot, Christian Dywan.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright 2015 Canonical Ltd.
 
2
 * Copyright 2016 Canonical Ltd.
3
3
 *
4
4
 * This program is free software; you can redistribute it and/or modify
5
5
 * it under the terms of the GNU Lesser General Public License as published by
22
22
    height: units.gu(60)
23
23
    objectName: "mainView"
24
24
    Page {
25
 
        title: "Sections test"
 
25
        id: page
 
26
        header: PageHeader {
 
27
            title: "Sections test"
 
28
        }
26
29
        Label {
27
30
            id: label
28
31
            objectName: "label"
29
32
            anchors {
30
 
                top: parent.top
 
33
                top: page.header.bottom
 
34
                topMargin: units.gu(2)
31
35
                horizontalCenter: parent.horizontalCenter
32
36
            }
33
37
            text: "Section " + sections.selectedIndex + " is selected."
35
39
        Sections {
36
40
            id: sections
37
41
            objectName: "sections"
38
 
            anchors.centerIn: parent
 
42
            anchors {
 
43
                horizontalCenter: parent.horizontalCenter
 
44
                top: label.bottom
 
45
                topMargin: units.gu(4)
 
46
            }
39
47
            model: [ "first", "second", "third" ]
40
48
        }
 
49
        Label {
 
50
            id: moreLabel
 
51
            objectName: "scrolling_label"
 
52
            anchors {
 
53
                centerIn: parent
 
54
            }
 
55
            text: "Scrollable section " + moreSections.selectedIndex + " is selected."
 
56
        }
 
57
        Sections {
 
58
            id: moreSections
 
59
            objectName: "scrolling_sections"
 
60
            anchors {
 
61
                horizontalCenter: parent.horizontalCenter
 
62
                top: moreLabel.bottom
 
63
                topMargin: units.gu(4)
 
64
                left: parent.left
 
65
                right: parent.right
 
66
            }
 
67
            model: ["one", "two", "three", "four", "five", "six",
 
68
                "seven", "eight", "nine", "ten", "eleven", "twelve",
 
69
                "thirteen", "fourteen", "fifteen", "sixteen",
 
70
                "seventeen", "eighteen", "nineteen", "twenty"
 
71
            ]
 
72
        }
41
73
    }
42
74
}