diff options
author | Marco Martin <notmart@gmail.com> | 2017-03-31 16:15:14 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-04-01 09:35:51 +0200 |
commit | 751626eec574363ef694e1301744704915e6b2ea (patch) | |
tree | feebeca13c2405cf9a5501435bd85b9acf360b7f /mobile-widgets/qml/DiveList.qml | |
parent | 34a42d7f04319973cbecfcc3b21c6bf8b29f2a22 (diff) | |
download | subsurface-751626eec574363ef694e1301744704915e6b2ea.tar.gz |
QML UI: Fully port dive edit to Kirigami2
Completely adapt to the api changes of OverlaySheet in Kirigami2
in order to achieve the same look and behavior for the dive
edits that had with kirigami1
Port most components to QtQuickContrls2, except comboboxes
in the dive edit sheet that will need a new control type
Signed-off-by: Marco Martin <notmart@gmail.com>
Diffstat (limited to 'mobile-widgets/qml/DiveList.qml')
-rw-r--r-- | mobile-widgets/qml/DiveList.qml | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index fc7e114fc..2ae618fa1 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -1,9 +1,9 @@ import QtQuick 2.6 -import QtQuick.Controls 1.2 +import QtQuick.Controls 2.0 import QtQuick.Layouts 1.2 import QtQuick.Window 2.2 import QtQuick.Dialogs 1.2 -import org.kde.kirigami 1.0 as Kirigami +import org.kde.kirigami 2.0 as Kirigami import org.subsurfacedivelog.mobile 1.0 Kirigami.ScrollablePage { @@ -209,11 +209,13 @@ Kirigami.ScrollablePage { } } - ScrollView { + Flickable { id: startPageWrapper anchors.fill: parent opacity: credentialStatus === QMLManager.NOCLOUD || (credentialStatus === QMLManager.VALID || credentialStatus === QMLManager.VALID_EMAIL) ? 0 : 1 visible: opacity > 0 + contentWidth: width + contentHeight: startPage.height Behavior on opacity { NumberAnimation { duration: Kirigami.Units.shortDuration } } onVisibleChanged: { print("startPageWrapper onVisibleChanged credentialStatus " + credentialStatus + " diveListView.count " + diveListView.count) @@ -233,6 +235,7 @@ Kirigami.ScrollablePage { title = qsTr("Dive list") } } + ScrollBar.vertical: ScrollBar { } StartPage { id: startPage @@ -277,14 +280,14 @@ Kirigami.ScrollablePage { } } - property QtObject addDiveAction: Action { + property QtObject addDiveAction: Kirigami.Action { iconName: "list-add" onTriggered: { startAddDive() } } - property QtObject saveAction: Action { + property QtObject saveAction: Kirigami.Action { iconName: "document-save" onTriggered: { Qt.inputMethod.hide() @@ -292,7 +295,7 @@ Kirigami.ScrollablePage { } } - property QtObject offlineAction: Action { + property QtObject offlineAction: Kirigami.Action { iconName: "qrc:/qml/nocloud.svg" onTriggered: { manager.syncToCloud = false |