Commit 1889f311 authored by Marco Martin's avatar Marco Martin
Browse files

add extra sheet

parent ebafca60
......@@ -156,7 +156,7 @@ Kirigami.ScrollablePage {
}
}
Kirigami.OverlaySheet {
Kirigami.OverlaySheet {
id: listViewSheet
header: Kirigami.Heading {
text: qsTr("Title")
......@@ -179,6 +179,40 @@ Kirigami.ScrollablePage {
}
}
Kirigami.OverlaySheet {
id: gridViewSheet
header: Kirigami.Heading {
text: qsTr("Title")
}
footer: RowLayout {
Controls.Label {
text: qsTr("Footer:")
}
Controls.TextField {
Layout.fillWidth: true
Layout.alignment: Qt.AlignCenter
}
}
GridView {
id: gridView
model: 100
implicitWidth: Kirigami.Units.gridUnit * 30
cellWidth: Math.max(Kirigami.Units.gridUnit * 5, Math.floor(width / Math.floor(width / (Kirigami.Units.gridUnit * 5))))
cellHeight: cellWidth
delegate: Item {
width: gridView.cellWidth
height: gridView.cellHeight
Rectangle {
color: Kirigami.Theme.highlightColor
radius: Kirigami.Units.gridUnit
anchors.centerIn: parent
width: Math.round(gridView.cellWidth * 0.8)
height: width
}
}
}
}
ColumnLayout {
width: page.width
spacing: Kirigami.Units.smallSpacing
......@@ -208,5 +242,10 @@ Kirigami.ScrollablePage {
Layout.alignment: Qt.AlignHCenter
onClicked: listViewSheet.open()
}
Controls.Button {
text: "Sheet With Grid View"
Layout.alignment: Qt.AlignHCenter
onClicked: gridViewSheet.open()
}
}
}
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