diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-02-10 18:09:16 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-02-10 21:05:23 -0800 |
commit | 38f7fd6fbe5ebcb16caacb9466adeed232243d2c (patch) | |
tree | ddb8f9a2b96b61c03a870788609cf3780d13f61b /qt-mobile/qml/DiveList.qml | |
parent | 055ec05e0f364e6d4aba86033ee87ab30df2d086 (diff) | |
download | subsurface-38f7fd6fbe5ebcb16caacb9466adeed232243d2c.tar.gz |
QML UI: allow changing credentials
With the integration of the credentials into the start page the logic for
this has changed.
Since the code for start page and dive list is actually on the same page,
using opacity to switch between the two sub pages (depending on whether we
have valid credentials and dives to show), the old way of changing
credentials no longer worked.
With theis patch the user once again can change their credentials (and
change their mind and go back to the dive list).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/qml/DiveList.qml')
-rw-r--r-- | qt-mobile/qml/DiveList.qml | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/qt-mobile/qml/DiveList.qml b/qt-mobile/qml/DiveList.qml index 13cc10411..45644c2d3 100644 --- a/qt-mobile/qml/DiveList.qml +++ b/qt-mobile/qml/DiveList.qml @@ -11,6 +11,9 @@ MobileComponents.Page { objectName: "DiveList" color: MobileComponents.Theme.viewBackgroundColor + property int credentialStatus: manager.credentialStatus + property int numDives: diveListView.count + Component { id: diveDelegate MobileComponents.ListItem { @@ -152,7 +155,10 @@ MobileComponents.Page { } ScrollView { + id: outerScrollView anchors.fill: parent + opacity: 0.8 - startPage.opacity + visible: opacity > 0 ListView { id: diveListView anchors.fill: parent @@ -169,10 +175,7 @@ MobileComponents.Page { x: MobileComponents.Units.gridUnit / 2 height: paintedHeight + MobileComponents.Units.gridUnit / 2 verticalAlignment: Text.AlignBottom - text: "Dive Log" - opacity: 0.8 - startPage.opacity - visible: opacity > 0 } Connections { target: detailsWindow @@ -183,7 +186,7 @@ MobileComponents.Page { StartPage { id: startPage anchors.fill: parent - opacity: (diveListView.count == 0) ? 1.0 : 0 + opacity: (credentialStatus == QMLManager.VALID || credentialStatus == QMLManager.VALID_EMAIL) ? 0 : 1 visible: opacity > 0 Behavior on opacity { NumberAnimation { duration: MobileComponents.Units.shortDuration } } } |