mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
7cc851ebad
commit
c53aa7dbfb
4 changed files with 30 additions and 0 deletions
|
@ -80,5 +80,33 @@ Rectangle {
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
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()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
BIN
qt-mobile/qml/icons/context-menu.png
Normal file
BIN
qt-mobile/qml/icons/context-menu.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 641 B |
1
qt-mobile/qml/icons/context-menu.svg
Normal file
1
qt-mobile/qml/icons/context-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="M24 16c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 4c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 12c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4z"/></svg>
|
After Width: | Height: | Size: 275 B |
|
@ -16,6 +16,7 @@
|
||||||
<file>dive.jpg</file>
|
<file>dive.jpg</file>
|
||||||
<file alias="subsurface-mobile-icon.png">../../icons/subsurface-mobile-icon.png</file>
|
<file alias="subsurface-mobile-icon.png">../../icons/subsurface-mobile-icon.png</file>
|
||||||
<file alias="main-menu.png">icons/main-menu.png</file>
|
<file alias="main-menu.png">icons/main-menu.png</file>
|
||||||
|
<file alias="context-menu.png">icons/context-menu.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/imports">
|
<qresource prefix="/imports">
|
||||||
<file alias="org/kde/plasma/mobilecomponents/qmldir">mobilecomponents/qmldir</file>
|
<file alias="org/kde/plasma/mobilecomponents/qmldir">mobilecomponents/qmldir</file>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue