Commit d023c842 authored by Marco Martin's avatar Marco Martin
Browse files

more documentation

parent 53f1b16f
...@@ -26,17 +26,33 @@ import "components" ...@@ -26,17 +26,33 @@ import "components"
Kirigami.ScrollablePage { Kirigami.ScrollablePage {
id: page id: page
Layout.fillWidth: true
//implicitWidth: Units.gridUnit * (Math.floor(Math.random() * 35) + 10)
title: qsTr("Overlay Sheets") title: qsTr("Overlay Sheets")
actions.main: Kirigami.Action { actions{
iconName: "documentinfo" main: Kirigami.Action {
text: qsTr("Info") iconName: "documentinfo"
checkable: true text: qsTr("Info")
onCheckedChanged: sheet.sheetOpen = checked; checkable: true
shortcut: "Alt+I" onCheckedChanged: sheet.sheetOpen = checked;
shortcut: "Alt+I"
contextualActions: [
Kirigami.Action {
text: qsTr("Action 1")
iconName: "bookmarks"
onTriggered: showPassiveNotification(qsTr("Action 1 clicked"))
Kirigami.Action {
text: qsTr("Disabled Action")
iconName: "folder"
enabled: false
Kirigami.Action {
text: qsTr("Action 3")
onTriggered: showPassiveNotification(qsTr("Action 3 clicked"))
} }
//Close the drawer with the back button //Close the drawer with the back button
...@@ -52,7 +68,7 @@ Kirigami.ScrollablePage { ...@@ -52,7 +68,7 @@ Kirigami.ScrollablePage {
title: qsTr("Drawers") title: qsTr("Drawers")
page: page page: page
sourceUrl: "" sourceUrl: ""
text: qsTr("") text: qsTr("Drawers are bars anchored to an edge of the screen: left, right, top or bottom.\nOn the left edge they should contain controls and settings global for the whole app, and is strongly encouraged to use the default component GlobalDrawer and to have only one instance for the whole application.\nOn the right edge they should have context-dependent actions linked to the current Page. It is strongly suggested to use the default component ContextDrawer for this and to have only one instance for the whole application.\nDrawers can be modal(default) in which they block input in the rest of the application window, clicking on a darkened out area will dismiss the drawer.\nNon modal drawers will leave the rest of the application window functional and vertical(left and right edge) drawers will become sidebars.\nNon modal drawers can also be collapsible, switching from a full vertical sidebar to a more compact vertical toolbar.\nYou can test between different Drawer modes in the \"Global Drawer Mode...\" menu entry in the global drawer of this application.")
} }
Kirigami.OverlayDrawer { Kirigami.OverlayDrawer {
...@@ -136,6 +152,12 @@ Kirigami.ScrollablePage { ...@@ -136,6 +152,12 @@ Kirigami.ScrollablePage {
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
onClicked: applicationWindow() onClicked: applicationWindow()
} }
Controls.Button {
text: qsTr("Right Context Drawer")
Layout.alignment: Qt.AlignHCenter
visible: applicationWindow().contextDrawer
onClicked: applicationWindow()
Controls.Button { Controls.Button {
text: qsTr("Modal Bottom Drawer") text: qsTr("Modal Bottom Drawer")
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment