Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Drawer {
- id: drawer
- anchors.fill: parent
- dock: page.isPortrait ? Dock.Top : Dock.Left
- background: SilicaListView {
- anchors.fill: parent
- model: 5
- header: PageHeader { title: "Drawer" }
- PullDownMenu { // The PullDownMenu is inside the ListView, see?
- MenuItem {
- text: "Option 1"
- }
- MenuItem {
- text: "Option 2"
- }
- }
- VerticalScrollDecorator {}
- delegate: ListItem {
- id: listItem
- Label {
- x: Theme.horizontalPageMargin
- text: "List Item " + modelData
- anchors.verticalCenter: parent.verticalCenter
- color: listItem.highlighted ? Theme.highlightColor : Theme.primaryColor
- }
- }
- }
- SilicaFlickable {
- anchors {
- fill: parent
- leftMargin: page.isPortrait ? 0 : controlPanel.visibleSize
- topMargin: page.isPortrait ? controlPanel.visibleSize : 0
- rightMargin: page.isPortrait ? 0 : progressPanel.visibleSize
- bottomMargin: page.isPortrait ? progressPanel.visibleSize : 0
- }
- contentHeight: column.height + Theme.paddingLarge
- VerticalScrollDecorator {}
- MouseArea {
- enabled: drawer.open
- anchors.fill: column
- onClicked: drawer.open = false
- }
- Column {
- id: column
- spacing: Theme.paddingLarge
- width: parent.width
- enabled: !drawer.opened
- PageHeader { title: "Popup Panels" }
- Button {
- text: controlPanel.open ? "Hide controls" : "Show controls"
- onClicked: controlPanel.open = !controlPanel.open
- anchors.horizontalCenter: parent.horizontalCenter
- }
- Button {
- text: progressPanel.open ? "Hide progress" : "Show progress"
- onClicked: progressPanel.open = !progressPanel.open
- anchors.horizontalCenter: parent.horizontalCenter
- }
- Button {
- text: "Open drawer"
- onClicked: drawer.open = true
- anchors.horizontalCenter: parent.horizontalCenter
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement