~zsombi/ubuntu-ui-toolkit/forgotten_interface_macros

« back to all changes in this revision

Viewing changes to tests/autopilot/ubuntuuitoolkit/tests/components/test_popover.qml

  • Committer: Tarmac
  • Author(s): Christian Dywan
  • Date: 2014-10-08 03:17:47 UTC
  • mfrom: (1275.1.3 uut.flickableDialogs)
  • Revision ID: tarmac-20141008031747-opildhm1zk4vkuxp
Make dialog contents scrollable. Fixes: https://bugs.launchpad.net/bugs/1376763.

Approved by PS Jenkins bot, Zsombor Egri.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2014 Canonical Ltd.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU Lesser General Public License as published by
 
6
 * the Free Software Foundation; version 3.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU Lesser General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU Lesser General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 */
 
16
 
 
17
import QtQuick 2.0
 
18
import Ubuntu.Components 1.1
 
19
import Ubuntu.Components.Popups 1.0
 
20
 
 
21
MainView {
 
22
    width: units.gu(48)
 
23
    height: units.gu(60)
 
24
 
 
25
    Page {
 
26
        title: "Popover"
 
27
 
 
28
        Column {
 
29
            Button {
 
30
                objectName: "button_small"
 
31
                text: "Small"
 
32
                onClicked: PopupUtils.open(smallDialogComponent)
 
33
            }
 
34
            Button {
 
35
                objectName: "button_huge"
 
36
                text: "Huge"
 
37
                onClicked: PopupUtils.open(hugeDialogComponent)
 
38
            }
 
39
        }
 
40
 
 
41
        Component {
 
42
            id: smallDialogComponent
 
43
            Dialog {
 
44
                objectName: "dialog_small"
 
45
                Column {
 
46
                    Button {
 
47
                        text: "Just a button"
 
48
                    }
 
49
                }
 
50
            }
 
51
        }
 
52
 
 
53
        Component {
 
54
            id: hugeDialogComponent
 
55
            Dialog {
 
56
                objectName: "dialog_huge"
 
57
                Column {
 
58
                    Repeater {
 
59
                        model: 50
 
60
 
 
61
                        Button {
 
62
                            objectName: "buttlet%1".arg(index)
 
63
                            text: "Button %1".arg(index)
 
64
                        }
 
65
                    }
 
66
                }
 
67
            }
 
68
        }
 
69
    }
 
70
}