From c53aa7dbfbb615e0aea28a414672882a86468cb3 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 4 Jan 2016 13:01:42 -0800 Subject: 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 --- qt-mobile/qml/TopBar.qml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'qt-mobile/qml/TopBar.qml') diff --git a/qt-mobile/qml/TopBar.qml b/qt-mobile/qml/TopBar.qml index e52909bca..a7630860f 100644 --- a/qt-mobile/qml/TopBar.qml +++ b/qt-mobile/qml/TopBar.qml @@ -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() + } + } + } + } } -- cgit v1.2.3-70-g09d2