mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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:
parent
164d2f8c07
commit
7cc851ebad
4 changed files with 27 additions and 0 deletions
|
@ -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; }
|
||||
|
|
BIN
qt-mobile/qml/icons/main-menu.png
Normal file
BIN
qt-mobile/qml/icons/main-menu.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 112 B |
1
qt-mobile/qml/icons/main-menu.svg
Normal file
1
qt-mobile/qml/icons/main-menu.svg
Normal 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 |
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue