-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gallery.qml
118 lines (99 loc) · 3.53 KB
/
gallery.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/*
* This file is part of harbour-opal.
* SPDX-License-Identifier: GPL-3.0-or-later
* SPDX-FileCopyrightText: 2020-2023 Mirian Margiani
*/
import QtQuick 2.0
import Sailfish.Silica 1.0 as S
import Opal.InfoCombo 1.0 as I
S.Page {
id: root
allowedOrientations: S.Orientation.All
S.SilicaFlickable {
anchors.fill: parent
contentHeight: column.height
S.VerticalScrollDecorator {}
Column {
id: column
width: parent.width
spacing: S.Theme.paddingMedium
S.PageHeader {
title: "Informed choices"
}
S.SectionHeader {
text: "Simple usage"
}
I.InfoCombo {
width: parent.width
label: "Soup preference"
menu: S.ContextMenu {
I.InfoMenuItem {
text: "Surprise me"
info: "We will provide you with a soup of our choice. " +
"It will be the one that is taken the least."
}
I.InfoMenuItem {
text: "Stew"
info: "It is up to you to decide whether " +
"stew counts as soup."
}
I.InfoMenuItem {
text: "Noodles"
info: "You cannot go wrong with a simple noodle soup."
}
}
}
S.SectionHeader {
text: "Almost as simple usage"
}
I.InfoCombo {
width: parent.width
label: "Food preference"
I.InfoComboSection {
placeAtTop: true
title: "Food types"
text: "We provide different kinds of food."
}
menu: S.ContextMenu {
S.MenuItem {
text: "Vegetarian"
property string info: "Vegetarian food does not have any meat."
}
S.MenuItem {
text: "Vegan"
property string info: "Vegan food is completely plant-based."
}
}
I.InfoComboSection {
placeAtTop: false
title: "What about meat?"
text: "We don't provide any meat."
}
}
S.SectionHeader {
text: "Many options"
}
I.InfoCombo {
width: parent.width
label: "Choices"
description: "This box allows you to choose from many options. Which " +
"one will you take?"
I.InfoComboSection {
title: "Why is this page empty?"
text: "Even though there are many options, none of them has an " +
"info property defined. If it weren't for this text, this " +
"page would be empty. In this case, a basic ComboBox would " +
"have been the better choice."
}
menu: S.ContextMenu {
Repeater {
model: 30
S.MenuItem {
text: "Choice No. " + (modelData + 1)
}
}
}
}
}
}
}