From 7cc851ebad3a9cef5a1238197754903f1c9ed9e4 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 4 Jan 2016 13:01:08 -0800 Subject: QML UI: add main 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 | 25 +++++++++++++++++++++++++ qt-mobile/qml/icons/main-menu.png | Bin 0 -> 112 bytes qt-mobile/qml/icons/main-menu.svg | 1 + qt-mobile/qml/mobile-resources.qrc | 1 + 4 files changed, 27 insertions(+) create mode 100644 qt-mobile/qml/icons/main-menu.png create mode 100644 qt-mobile/qml/icons/main-menu.svg (limited to 'qt-mobile/qml') diff --git a/qt-mobile/qml/TopBar.qml b/qt-mobile/qml/TopBar.qml index 5ebf3b390..e52909bca 100644 --- a/qt-mobile/qml/TopBar.qml +++ b/qt-mobile/qml/TopBar.qml @@ -24,6 +24,31 @@ Rectangle { anchors.leftMargin: MobileComponents.Units.smallSpacing anchors.right: topPart.right anchors.rightMargin: MobileComponents.Units.smallSpacing + Item { + id: mainMenu + anchors.left: parent.left + Layout.preferredHeight: mainMenuIcon.height + width: mainMenuIcon.width + Image { + id: mainMenuIcon + source: "qrc:/qml/main-menu.png" + width: MobileComponents.Units.gridUnit + height: width + anchors { + top: parent.top + topMargin: MobileComponents.Units.smallSpacing * -1 + leftMargin: MobileComponents.Units.smallSpacing + + } + } + MouseArea { + height: parent.height + width: parent.width + onClicked: { + globalDrawer.open() + } + } + } Item { Layout.preferredHeight: subsurfaceLogo.height Rectangle { color: "green"; anchors.fill: parent; } diff --git a/qt-mobile/qml/icons/main-menu.png b/qt-mobile/qml/icons/main-menu.png new file mode 100644 index 000000000..20729b8f5 Binary files /dev/null and b/qt-mobile/qml/icons/main-menu.png differ diff --git a/qt-mobile/qml/icons/main-menu.svg b/qt-mobile/qml/icons/main-menu.svg new file mode 100644 index 000000000..1e89193f5 --- /dev/null +++ b/qt-mobile/qml/icons/main-menu.svg @@ -0,0 +1 @@ + diff --git a/qt-mobile/qml/mobile-resources.qrc b/qt-mobile/qml/mobile-resources.qrc index 945b53a10..24b88676f 100644 --- a/qt-mobile/qml/mobile-resources.qrc +++ b/qt-mobile/qml/mobile-resources.qrc @@ -15,6 +15,7 @@ StartPage.qml dive.jpg ../../icons/subsurface-mobile-icon.png + icons/main-menu.png mobilecomponents/qmldir -- cgit v1.2.3-70-g09d2