QML UI: experimentally turn off all the top bar buttons

This allows us to shrink the top bar quite a bit and have a little more
screen real estate. In order to maintain functionality we need to reenable
the context menu on some screens.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-02-12 04:12:20 -08:00
parent 093c5fa5ff
commit a738174a45

View file

@ -12,9 +12,10 @@ Rectangle {
id: topPart id: topPart
property bool goBack: (stackView.depth > 1) property bool goBack: (stackView.depth > 1)
property double topMenuShrink: 0.6
color: subsurfaceTheme.accentColor color: subsurfaceTheme.accentColor
Layout.minimumHeight: Math.round(MobileComponents.Units.gridUnit * 2.5) Layout.minimumHeight: Math.round(MobileComponents.Units.gridUnit * 2.5 * topMenuShrink)
Layout.fillWidth: true Layout.fillWidth: true
Layout.margins: 0 Layout.margins: 0
RowLayout { RowLayout {
@ -24,6 +25,7 @@ Rectangle {
anchors.leftMargin: MobileComponents.Units.smallSpacing anchors.leftMargin: MobileComponents.Units.smallSpacing
anchors.right: topPart.right anchors.right: topPart.right
anchors.rightMargin: MobileComponents.Units.smallSpacing anchors.rightMargin: MobileComponents.Units.smallSpacing
/* remove hamburger menu
Item { Item {
id: mainMenu id: mainMenu
anchors.left: parent.left anchors.left: parent.left
@ -49,9 +51,9 @@ Rectangle {
} }
} }
} }
*/
Item { Item {
Layout.preferredHeight: subsurfaceLogo.height Layout.preferredHeight: subsurfaceLogo.height
Rectangle { color: "green"; anchors.fill: parent; }
Image { Image {
id: subsurfaceLogo id: subsurfaceLogo
source: "qrc:/qml/subsurface-mobile-icon.png" source: "qrc:/qml/subsurface-mobile-icon.png"
@ -60,13 +62,13 @@ Rectangle {
topMargin: MobileComponents.Units.smallSpacing * -1 topMargin: MobileComponents.Units.smallSpacing * -1
left: parent.left left: parent.left
} }
width: Math.round(MobileComponents.Units.gridUnit * 1.7) width: Math.round(MobileComponents.Units.gridUnit * 1.7 * topMenuShrink)
height: width height: width
} }
MobileComponents.Label { MobileComponents.Label {
text: qsTr("Subsurface-mobile") text: qsTr("Subsurface-mobile")
font.pointSize: Math.round(MobileComponents.Theme.defaultFont.pointSize * 1.3) font.pointSize: Math.round(MobileComponents.Theme.defaultFont.pointSize * 1.3 * topMenuShrink)
height: subsurfaceLogo.height * 2 height: subsurfaceLogo.height * 2 * topMenuShrink
anchors { anchors {
left: subsurfaceLogo.right left: subsurfaceLogo.right
bottom: subsurfaceLogo.bottom bottom: subsurfaceLogo.bottom
@ -81,6 +83,7 @@ Rectangle {
Item { Item {
Layout.fillWidth: true Layout.fillWidth: true
} }
/* remove edit button
Item { Item {
id: editButton id: editButton
anchors.right: backButton.visible ? backButton.left : contextDrawer.enabled ? contextMenu.left : parent.right anchors.right: backButton.visible ? backButton.left : contextDrawer.enabled ? contextMenu.left : parent.right
@ -108,6 +111,8 @@ Rectangle {
} }
} }
} }
*/
/* remove back button
Item { Item {
id: backButton id: backButton
anchors.right: contextDrawer.enabled ? contextMenu.left : parent.right anchors.right: contextDrawer.enabled ? contextMenu.left : parent.right
@ -138,6 +143,8 @@ Rectangle {
} }
} }
} }
*/
/* remove context menu
Item { Item {
id: contextMenu id: contextMenu
visible: contextDrawer.enabled visible: contextDrawer.enabled
@ -165,5 +172,6 @@ Rectangle {
} }
} }
} }
*/
} }
} }