summaryrefslogtreecommitdiff
path: root/gui/qml/skins/navit/Cellar.qml
diff options
context:
space:
mode:
Diffstat (limited to 'gui/qml/skins/navit/Cellar.qml')
-rw-r--r--gui/qml/skins/navit/Cellar.qml30
1 files changed, 21 insertions, 9 deletions
diff --git a/gui/qml/skins/navit/Cellar.qml b/gui/qml/skins/navit/Cellar.qml
index 129a6088..2df59cb5 100644
--- a/gui/qml/skins/navit/Cellar.qml
+++ b/gui/qml/skins/navit/Cellar.qml
@@ -2,17 +2,20 @@ import Qt 4.6
Rectangle {
- function hideButtons() {
- if ( gui.returnSource.split('/').length < 4 ) {
- btnBack.opacity=0;
+ function onStartup() {
+ console.log("returnSource: "+gui.returnSource);
+ if ( gui.returnSource.split('/').length > 2 ) {
+ btnBack.opacity=1;
}
- if ( gui.returnSource == "/main.qml" ) {
- btnHome.opacity=0;
- btnBack.opacity=0;
+ if ( gui.returnSource != "/point.qml" ) {
+ btnPoint.opacity=1
+ }
+ if ( gui.returnSource != "/main.qml" ) {
+ btnMenu.opacity=1;
}
}
- Component.onCompleted: hideButtons();
+ Component.onCompleted: onStartup();
ButtonIcon {
id: btnMap; icon: "gui_map.svg"; text:"Map"; onClicked: gui.backToMap();
@@ -21,15 +24,24 @@ Rectangle {
}
ButtonIcon {
- id: btnHome; icon: "gui_home.svg"; text: "Home"; onClicked: { gui.returnSource=""; gui.setPage("main.qml"); }
- anchors.horizontalCenter: parent.horizontalCenter; anchors.leftMargin: 3
+ id: btnPoint; icon: "gui_arrow_up.svg"; text: "Point"; onClicked: { gui.returnSource=""; gui.setPage("point.qml"); }
+ anchors.left: btnMap.left; anchors.leftMargin: parent.width/3;
+ anchors.bottom: parent.bottom; anchors.bottomMargin: 3
+ opacity: 0;
+ }
+
+ ButtonIcon {
+ id: btnMenu; icon: "gui_menu.svg"; text: "Menu"; onClicked: { gui.returnSource=""; gui.setPage("main.qml"); }
+ anchors.right: btnBack.right; anchors.rightMargin: parent.width/3;
anchors.bottom: parent.bottom; anchors.bottomMargin: 3
+ opacity: 0;
}
ButtonIcon {
id: btnBack; icon: "gui_arrow_left.svg"; text: "Back"; onClicked: gui.backToPrevPage();
anchors.right: parent.right; anchors.leftMargin: 3
anchors.bottom: parent.bottom; anchors.bottomMargin: 3
+ opacity: 0;
}
}