Changeset View
Changeset View
Standalone View
Standalone View
src/data/contents/ui/gallery/SelectionControlsGallery.qml
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | 41 | onBackRequested: { | |||
---|---|---|---|---|---|
42 | if (sheet.sheetOpen) { | 42 | if (sheet.sheetOpen) { | ||
43 | event.accepted = true; | 43 | event.accepted = true; | ||
44 | sheet.close(); | 44 | sheet.close(); | ||
45 | } | 45 | } | ||
46 | } | 46 | } | ||
47 | 47 | | |||
48 | InfoSheet { | 48 | InfoSheet { | ||
49 | id: sheet | 49 | id: sheet | ||
50 | | ||||
50 | page: page | 51 | page: page | ||
51 | title: qsTr("Selection Controls") | 52 | component: "SelectionControlsGallery" | ||
52 | higUrl: "https://hig.kde.org/components/index.html#selection" | | |||
53 | sourceUrl: "https://cgit.kde.org/kirigami-gallery.git/tree/src/data/contents/ui/gallery/SelectionControlsGallery.qml" | | |||
54 | text: qsTr("<p>Selection controls allow users to complete tasks that involve a choice or a selection.</p> <p>Depending on the kind of choice that has to be made, the best control to use may be a Checkbox, a RadioButton, or a Switch.</p> <ul><li>Use checkboxes for non-exclusive options that have clear alternatives. Mutually exclusive options should use a set of radio buttons or a combo box.</li> <li>Use radio buttons for a few mutually exclusive options. If there are more than five options (or if there is not enough space to arrange four or five options), use a combo box or list instead.</li> <li>Use switches on Mobile, when immediately activating or deactivating something (ok/Apply buttons not needed).</li></ul>") | | |||
55 | } | 53 | } | ||
56 | 54 | | |||
57 | Controls.Dialog { | 55 | Controls.Dialog { | ||
58 | id: checkListDialog | 56 | id: checkListDialog | ||
59 | modal: true | 57 | modal: true | ||
60 | focus: true | 58 | focus: true | ||
61 | x: (page.width - width) / 2 | 59 | x: (page.width - width) / 2 | ||
62 | y: page.height / 2 - height | 60 | y: page.height / 2 - height | ||
▲ Show 20 Lines • Show All 118 Lines • Show Last 20 Lines |