mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 17:53:32 +02:00
nav bar menu now bring you back to menu root
This commit is contained in:
parent
99b6c6f1fd
commit
ef699db5be
2 changed files with 48 additions and 61 deletions
|
@ -4,19 +4,64 @@ import QtQuick.Controls 1.4
|
|||
import QtQml 2.2
|
||||
import "."
|
||||
|
||||
|
||||
Item {
|
||||
id: tabletMenu
|
||||
objectName: "tabletMenu"
|
||||
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
width: 480
|
||||
height: 720
|
||||
|
||||
property var rootMenu: Menu { objectName:"rootMenu" }
|
||||
property var point: Qt.point(50, 50)
|
||||
|
||||
TabletMouseHandler { id: menuPopperUpper }
|
||||
|
||||
Rectangle {
|
||||
id: bgNavBar
|
||||
height: 90
|
||||
z: 1
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
position: 0
|
||||
color: "#2b2b2b"
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
position: 1
|
||||
color: "#1e1e1e"
|
||||
}
|
||||
}
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 0
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 0
|
||||
anchors.topMargin: 0
|
||||
anchors.top: parent.top
|
||||
|
||||
Image {
|
||||
id: menuRootIcon
|
||||
width: 40
|
||||
height: 40
|
||||
source: "../../../icons/tablet-icons/menu-i.svg"
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 15
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
// navigate back to top level menu
|
||||
onClicked: buildMenu();
|
||||
}
|
||||
}
|
||||
|
||||
ColorOverlay {
|
||||
id: iconColorOverlay
|
||||
anchors.fill: menuRootIcon
|
||||
source: menuRootIcon
|
||||
color: "#ffffff"
|
||||
}
|
||||
}
|
||||
|
||||
function setRootMenu(menu) {
|
||||
tabletMenu.rootMenu = menu
|
||||
buildMenu()
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
import QtQuick 2.5
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
import "../../styles-uit"
|
||||
|
||||
|
@ -27,63 +26,6 @@ FocusScope {
|
|||
|
||||
HifiConstants { id: hifi }
|
||||
|
||||
Rectangle {
|
||||
id: bgNavBar
|
||||
height: 90
|
||||
z: 1
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
position: 0
|
||||
color: "#2b2b2b"
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
position: 1
|
||||
color: "#1e1e1e"
|
||||
}
|
||||
}
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 0
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 0
|
||||
anchors.topMargin: 0
|
||||
anchors.top: parent.top
|
||||
|
||||
Image {
|
||||
id: menuRootIcon
|
||||
width: 40
|
||||
height: 40
|
||||
source: "../../../icons/tablet-icons/menu-i.svg"
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 15
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
// TODO: navigate back to top level menu
|
||||
onClicked: iconColorOverlay.color = "#1fc6a6"
|
||||
}
|
||||
}
|
||||
|
||||
ColorOverlay {
|
||||
id: iconColorOverlay
|
||||
anchors.fill: menuRootIcon
|
||||
source: menuRootIcon
|
||||
color: "#ffffff"
|
||||
}
|
||||
|
||||
RalewayBold {
|
||||
id: breadcrumbText
|
||||
text: "MENU"
|
||||
size: 18
|
||||
color: "#ffffff"
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: menuRootIcon.right
|
||||
anchors.leftMargin: 15
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: background
|
||||
anchors.fill: listView
|
||||
|
|
Loading…
Reference in a new issue