~zeller-benjamin/ubuntu-ui-toolkit/qrcify3

« back to all changes in this revision

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

  • Committer: Benjamin Zeller
  • Date: 2015-09-10 08:43:12 UTC
  • mfrom: (1585.1.2 staging)
  • Revision ID: benjamin.zeller@canonical.com-20150910084312-6eh8n2729jpslgmb
Merge staging

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
import QtQuick 2.0
18
18
import Ubuntu.Components 1.3
19
 
import Ubuntu.Components.ListItems 1.3 as ListItem
20
19
import Ubuntu.Components.Popups 1.3
21
20
import Qt.labs.folderlistmodel 2.1
22
21
 
32
31
 
33
32
            Icon {
34
33
                name: "call-start"
35
 
                width: 16
36
 
                height: 16
37
 
                anchors.verticalCenter: parent.verticalCenter
38
 
            }
39
 
 
40
 
            Icon {
41
 
                name: "call-start"
42
 
                width: 48
43
 
                height: 48
44
 
                anchors.verticalCenter: parent.verticalCenter
45
 
            }
46
 
 
47
 
            Icon {
48
 
                name: "call-start"
49
 
                width: 96
50
 
                height: 96
 
34
                width: units.gu(2)
 
35
                height: width
 
36
                anchors.verticalCenter: parent.verticalCenter
 
37
            }
 
38
 
 
39
            Icon {
 
40
                name: "call-start"
 
41
                width: units.gu(6)
 
42
                height: width
 
43
                anchors.verticalCenter: parent.verticalCenter
 
44
            }
 
45
 
 
46
            Icon {
 
47
                name: "call-start"
 
48
                width: units.gu(12)
 
49
                height: width
51
50
            }
52
51
        }
53
52
 
54
53
        TemplateRow {
55
 
            title: i18n.tr("Colorization")
 
54
            title: i18n.tr("Color")
56
55
            spacing: units.gu(2)
57
56
 
58
57
            Icon {
59
58
                name: "stock_alarm-clock"
60
 
                width: 24
61
 
                height: 24
 
59
                width: units.gu(3)
 
60
                height: width
62
61
            }
63
62
 
64
63
            Icon {
65
64
                name: "stock_alarm-clock"
66
65
                color: UbuntuColors.orange
67
 
                width: 24
68
 
                height: 24
 
66
                width: units.gu(3)
 
67
                height: width
69
68
            }
70
69
 
71
70
            Icon {
72
71
                name: "stock_alarm-clock"
73
72
                color: UbuntuColors.lightAubergine
74
 
                width: 24
75
 
                height: 24
 
73
                width: units.gu(3)
 
74
                height: width
76
75
            }
77
76
        }
78
77
 
97
96
                    Icon {
98
97
                        id: themedIcon
99
98
                        name: fileBaseName || ""
100
 
                        width: 24
101
 
                        height: 24
 
99
                        width: units.gu(3)
 
100
                        height: width
102
101
                        MouseArea {
103
102
                            anchors.fill: parent
104
 
                            onClicked: PopupUtils.open(iconPop, themedIcon, { 'icon': themedIcon.name })
 
103
                            onClicked: PopupUtils.open(iconPop, themedIcon, { 'iconName': themedIcon.name })
105
104
                        }
106
105
                        Component {
107
106
                            id: iconPop
108
107
                            Popover {
109
108
                                id: iconPopover
110
 
                                property string icon: "N/A"
111
 
 
112
 
                                Column {
113
 
                                    anchors.top: parent.top
114
 
                                    anchors.left: parent.left
115
 
                                    anchors.right: parent.right
116
 
 
117
 
                                    ListItem.Standard {
118
 
                                        iconName: iconPopover.icon
119
 
                                        text: iconPopover.icon
 
109
                                property string iconName: "N/A"
 
110
                                Item {
 
111
                                    anchors {
 
112
                                        left: parent.left
 
113
                                        right: parent.right
 
114
                                    }
 
115
                                    height: units.gu(6)
 
116
                                    UbuntuShape {
 
117
                                        id: iconShape
 
118
                                        anchors {
 
119
                                            left: parent.left
 
120
                                            top: parent.top
 
121
                                            bottom: parent.bottom
 
122
                                        }
 
123
                                        width: units.gu(6)
 
124
                                        Icon {
 
125
                                            anchors.fill: parent
 
126
                                            name: iconPopover.iconName
 
127
                                        }
 
128
                                    }
 
129
 
 
130
                                    Label {
 
131
                                        anchors {
 
132
                                            verticalCenter: parent.verticalCenter
 
133
                                            left: iconShape.right
 
134
                                            leftMargin: units.gu(1)
 
135
                                        }
 
136
                                        text: iconPopover.iconName
120
137
                                    }
121
138
                                }
122
139
                            }