diff options
author | Jan Mulder <jlmulder@xs4all.nl> | 2017-11-19 19:27:45 +0100 |
---|---|---|
committer | Jan Mulder <jlmulder@xs4all.nl> | 2018-02-17 21:05:33 +0100 |
commit | bd10a8442a25bbaa9d6c8256c486af45440d2886 (patch) | |
tree | 2a8b99660f176cc026e23ff910986c9c0c46e047 /mobile-widgets | |
parent | d5d830eac07311e3a920acabd8b94fd3d21d1db1 (diff) | |
download | subsurface-bd10a8442a25bbaa9d6c8256c486af45440d2886.tar.gz |
Mobile QML: main.qml to Kirigmi 2.2
This is a long standing issue. I wish to keep up with Kirigami developments
including new versions of their controls, but this is not always easy.
While we upgraded to Kirigmi 2.2 for most of our QML earlier, using this
new version of main.qml breaks numerous stuff. In fact, so much that
we just needed to wait.
With the progress in Kirigmi, it is now possible to upgrade, with still
some issues on our side to be fixed, but this is manageble now.
The main show-stopper was a construct to set our theme colors, for example:
Kirigami.Theme.highlightColor = Qt.binding(...)
This is not posssible any more, as the Kirigami.Theme has made these
readonly on their end.
This commit just removes the assignments to the now readonly theme
items. And the setting of a correct theme color for the action button.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/qml/DiveDetails.qml | 1 | ||||
-rw-r--r-- | mobile-widgets/qml/DiveList.qml | 1 | ||||
-rw-r--r-- | mobile-widgets/qml/main.qml | 13 |
3 files changed, 3 insertions, 12 deletions
diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml index 042e59e38..2b796bb14 100644 --- a/mobile-widgets/qml/DiveDetails.qml +++ b/mobile-widgets/qml/DiveDetails.qml @@ -176,6 +176,7 @@ Kirigami.Page { actions.main: Kirigami.Action { icon { name: state !== "view" ? "document-save" : "document-edit" + color: subsurfaceTheme.primaryColor } onTriggered: { manager.appendTextToLog("save/edit button triggered") diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index d5719b862..cf4f99e5a 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -333,6 +333,7 @@ Kirigami.ScrollablePage { property QtObject downloadFromDCAction: Kirigami.Action { icon { name: "downloadDC" + color: subsurfaceTheme.primaryColor } onTriggered: { downloadFromDc.dcImportModel.clearTable() diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml index 08b5f329f..b5bac7869 100644 --- a/mobile-widgets/qml/main.qml +++ b/mobile-widgets/qml/main.qml @@ -7,7 +7,7 @@ import QtQuick.Dialogs 1.2 import QtQuick.Layouts 1.2 import QtQuick.Window 2.2 import org.subsurfacedivelog.mobile 1.0 -import org.kde.kirigami 2.0 as Kirigami +import org.kde.kirigami 2.2 as Kirigami Kirigami.ApplicationWindow { id: rootItem @@ -443,17 +443,6 @@ if you have network connectivity and want to sync your data to cloud storage."), property int columnWidth: Math.round(rootItem.width/(Kirigami.Units.gridUnit*28)) > 0 ? Math.round(rootItem.width / Math.round(rootItem.width/(Kirigami.Units.gridUnit*28))) : rootItem.width Component.onCompleted: { - Kirigami.Theme.highlightColor = Qt.binding(function() { return primaryColor }) - Kirigami.Theme.highlightedTextColor = Qt.binding(function() { return darkerPrimaryTextColor }) - Kirigami.Theme.backgroundColor = Qt.binding(function() { return backgroundColor }) - Kirigami.Theme.textColor = Qt.binding(function() { return textColor }) - Kirigami.Theme.buttonHoverColor = Qt.binding(function() { return primaryColor }) - Kirigami.Theme.viewBackgroundColor = Qt.binding(function() { return drawerColor }) - Kirigami.Theme.viewTextColor = Qt.binding(function() { return textColor }) - Kirigami.Theme.buttonBackgroundColor = Qt.binding(function() { return drawerColor }) - Kirigami.Theme.buttonTextColor = Qt.binding(function() { return textColor }) - Kirigami.Theme.buttonFocusColor = Qt.binding(function() { return "red" }) - // this needs to pick the theme from persistent preference settings var theme = manager.theme if (theme == "Blue") |