summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.lima@openbossa.org>2012-06-18 15:09:21 -0300
committerHugo Parente Lima <hugo.lima@openbossa.org>2012-06-18 15:09:21 -0300
commitf6bfc3ec724d91ff39b141a8529935c071ef7549 (patch)
tree5092385c68a19d7e4ef0a4dadf94f09302704a43
parent24ecdf899627ad974f42368ed964c4aa6bfe086e (diff)
The designers changed their minds about the start up behavior, so reverting this commit to implement yet another different behavior.
Revert "Enable all panels (tabs and favorites) no matter if there's no webpages opened or favorites registered." This reverts commit b38be32a84ed0d3f4a8d1197cefac77e0d16046f.
-rw-r--r--src/mobile/images/view_menu_bg_disable.pngbin0 -> 29898 bytes
-rw-r--r--src/mobile/qml/Main.qml1
-rw-r--r--src/mobile/qml/NavigationPanel.qml1
-rw-r--r--src/mobile/qml/PanelToggle.qml9
-rw-r--r--src/mobile/snowshoe-mobile.qrc1
5 files changed, 11 insertions, 1 deletions
diff --git a/src/mobile/images/view_menu_bg_disable.png b/src/mobile/images/view_menu_bg_disable.png
new file mode 100644
index 0000000..2409f42
--- /dev/null
+++ b/src/mobile/images/view_menu_bg_disable.png
Binary files differ
diff --git a/src/mobile/qml/Main.qml b/src/mobile/qml/Main.qml
index 2a156b9..0e729cf 100644
--- a/src/mobile/qml/Main.qml
+++ b/src/mobile/qml/Main.qml
@@ -36,6 +36,7 @@ Rectangle {
topMargin: 32
horizontalCenter: parent.horizontalCenter
}
+ navigationEnabled: navigationPanel.hasOpennedTabs
onTopSitesSelected: {
rootPage.state = "favorites";
}
diff --git a/src/mobile/qml/NavigationPanel.qml b/src/mobile/qml/NavigationPanel.qml
index e545c75..cf9afa1 100644
--- a/src/mobile/qml/NavigationPanel.qml
+++ b/src/mobile/qml/NavigationPanel.qml
@@ -22,6 +22,7 @@ import "UiConstants.js" as UiConstants
Item {
id: navigationPanel
+ property bool hasOpennedTabs: TabsModel.count > 0
property alias url: navigationBar.url
property QtObject visibleTab: TabsModel.currentWebView
property QtObject lastVisibleTab
diff --git a/src/mobile/qml/PanelToggle.qml b/src/mobile/qml/PanelToggle.qml
index f0027a9..92f5606 100644
--- a/src/mobile/qml/PanelToggle.qml
+++ b/src/mobile/qml/PanelToggle.qml
@@ -19,12 +19,18 @@ import QtQuick 2.0
Image {
id: panelToggle
+ property bool navigationEnabled: true
property alias topSitesButtonSelected: topsites.visible
signal topSitesSelected()
signal tabsSelected()
- source: "qrc:///mobile/app/menu_unpressed"
+ onNavigationEnabledChanged: {
+ if (!navigationEnabled)
+ topsites.visible = true;
+ }
+
+ source: navigationEnabled ? "qrc:///mobile/app/menu_unpressed" : "qrc:///mobile/app/menu_disabled"
Image {
id: topsites
@@ -45,6 +51,7 @@ Image {
}
MouseArea {
anchors.fill: tabs
+ visible: navigationEnabled
onClicked: topsites.visible = false
}
}
diff --git a/src/mobile/snowshoe-mobile.qrc b/src/mobile/snowshoe-mobile.qrc
index 9d18697..c0b09f5 100644
--- a/src/mobile/snowshoe-mobile.qrc
+++ b/src/mobile/snowshoe-mobile.qrc
@@ -25,6 +25,7 @@
<file alias="app/bg_image">images/app_bg.png</file>
<file alias="app/side_shadow">images/overlayer.png</file>
<file alias="app/menu_unpressed">images/view_menu_bg_unpressed.png</file>
+ <file alias="app/menu_disabled">images/view_menu_bg_disable.png</file>
<file alias="app/tabs_pressed">images/view_menu_tabs_pressed.png</file>
<file alias="app/mysites_pressed">images/view_menu_mysites_pressed.png</file>
<file alias="indicator/page_active">images/pagination_active.png</file>