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 <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-01-04 13:01:08 -08:00
parent 164d2f8c07
commit 7cc851ebad
4 changed files with 27 additions and 0 deletions

View file

@ -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; }

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M6 36h36v-4H6v4zm0-10h36v-4H6v4zm0-14v4h36v-4H6z"/></svg>

After

Width:  |  Height:  |  Size: 150 B

View file

@ -15,6 +15,7 @@
<file>StartPage.qml</file>
<file>dive.jpg</file>
<file alias="subsurface-mobile-icon.png">../../icons/subsurface-mobile-icon.png</file>
<file alias="main-menu.png">icons/main-menu.png</file>
</qresource>
<qresource prefix="/imports">
<file alias="org/kde/plasma/mobilecomponents/qmldir">mobilecomponents/qmldir</file>