QML UI: add context menu button

Right now this is an alternative to the magic action button - but the goal is
to replace it completely.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-01-04 13:01:42 -08:00
parent 7cc851ebad
commit c53aa7dbfb
4 changed files with 30 additions and 0 deletions

View file

@ -80,5 +80,33 @@ Rectangle {
Item {
Layout.fillWidth: true
}
Item {
id: contextMenu
visible: contextDrawer.enabled
anchors.right: parent.right
anchors.top: parent.top
Layout.preferredHeight: contextMenuIcon.height
width: contextMenuIcon.width
Image {
id: contextMenuIcon
source: "qrc:/qml/context-menu.png"
width: MobileComponents.Units.gridUnit
height: width
anchors {
top: parent.top
right: parent.right
topMargin: MobileComponents.Units.smallSpacing * -1
rightMargin: MobileComponents.Units.smallSpacing
}
}
MouseArea {
height: parent.height
width: parent.width
onClicked: {
contextDrawer.open()
}
}
}
}
}