summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2020-01-15 09:40:54 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-02-03 17:30:35 -0800
commit35de9c49a4f2c2ab5abc3f52e8d005c0d1225971 (patch)
tree75190bcbf37239cfabfa1e47a40fc6e94c28d8cd /mobile-widgets
parent38120d555f45fb36c3d7de5b429f8a5e00ffa1e7 (diff)
downloadsubsurface-35de9c49a4f2c2ab5abc3f52e8d005c0d1225971.tar.gz
mobile-widgets: switch to new subsurfaceTheme
Remove subsurfaceTheme from main.qml Replace ThemeNew -> subsurfaceTheme change registration ThemeNew -> subsurfaceTheme Signed-off-by: jan Iversen <jan@casacondor.com>
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qml/DiveDetails.qml4
-rw-r--r--mobile-widgets/qml/Settings.qml6
-rw-r--r--mobile-widgets/qml/ThemeTest.qml2
-rw-r--r--mobile-widgets/qml/main.qml26
-rw-r--r--mobile-widgets/themeinterface.cpp2
5 files changed, 8 insertions, 32 deletions
diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml
index 5f6e6a823..8150b381c 100644
--- a/mobile-widgets/qml/DiveDetails.qml
+++ b/mobile-widgets/qml/DiveDetails.qml
@@ -188,8 +188,8 @@ Kirigami.Page {
actions.main: Kirigami.Action {
icon {
- name: state !== "view" ? ThemeNew.iconStyle + "/document-save.svg" :
- ThemeNew.iconStyle + "/document-edit.svg"
+ name: state !== "view" ? subsurfaceTheme.iconStyle + "/document-save.svg" :
+ subsurfaceTheme.iconStyle + "/document-edit.svg"
color: subsurfaceTheme.primaryColor
}
text: state !== "view" ? qsTr("Save edits") : qsTr("Edit dive")
diff --git a/mobile-widgets/qml/Settings.qml b/mobile-widgets/qml/Settings.qml
index f7b0f9087..ef641e51f 100644
--- a/mobile-widgets/qml/Settings.qml
+++ b/mobile-widgets/qml/Settings.qml
@@ -145,15 +145,15 @@ TemplatePage {
TemplateComboBox {
editable: false
Layout.columnSpan: 2
- currentIndex: (ThemeNew.currentTheme === "Blue") ? 0 :
- (ThemeNew.currentTheme === "Pink") ? 1 : 2
+ currentIndex: (subsurfaceTheme.currentTheme === "Blue") ? 0 :
+ (subsurfaceTheme.currentTheme === "Pink") ? 1 : 2
model: ListModel {
ListElement {text: qsTr("Blue")}
ListElement {text: qsTr("Pink")}
ListElement {text: qsTr("Dark")}
}
onActivated: {
- ThemeNew.currentTheme = currentIndex === 0 ? "Blue" :
+ subsurfaceTheme.currentTheme = currentIndex === 0 ? "Blue" :
currentIndex === 1 ? "Pink" : "Dark"
}
}
diff --git a/mobile-widgets/qml/ThemeTest.qml b/mobile-widgets/qml/ThemeTest.qml
index 24b178b73..49f8d6192 100644
--- a/mobile-widgets/qml/ThemeTest.qml
+++ b/mobile-widgets/qml/ThemeTest.qml
@@ -69,7 +69,7 @@ Kirigami.Page {
text: "basePointSize:"
}
Controls.Label {
- text: ThemeNew.basePointSize
+ text: subsurfaceTheme.basePointSize
}
Controls.Label {
diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml
index e002062c8..7423c60c6 100644
--- a/mobile-widgets/qml/main.qml
+++ b/mobile-widgets/qml/main.qml
@@ -563,7 +563,7 @@ if you have network connectivity and want to sync your data to cloud storage."),
] // end actions
Image {
fillMode: Image.PreserveAspectFit
- source: "qrc:///icons/" + (ThemeNew.currentTheme !== "" ? ThemeNew.currentTheme : "Blue") + "_gps.svg"
+ source: "qrc:///icons/" + (subsurfaceTheme.currentTheme !== "" ? subsurfaceTheme.currentTheme : "Blue") + "_gps.svg"
visible: locationServiceEnabled
}
}
@@ -607,30 +607,6 @@ if you have network connectivity and want to sync your data to cloud storage."),
}
}
- QtObject {
- id: subsurfaceTheme
-
- property double regularPointSize: ThemeNew.regularPointSize
- property double titlePointSize: ThemeNew.titlePointSize
- property double headingPointSize: ThemeNew.headingPointSize
- property double smallPointSize: ThemeNew.smallPointSize
-
- // colors currently in use
- property color darkerPrimaryColor: ThemeNew.darkerPrimaryColor
- property color darkerPrimaryTextColor: ThemeNew.darkerPrimaryTextColor
- property color primaryColor: ThemeNew.primaryColor
- property color primaryTextColor: ThemeNew.primaryTextColor
- property color lightPrimaryColor: ThemeNew.lightPrimaryColor
- property color lightPrimaryTextColor: ThemeNew.lightPrimaryTextColor
- property color backgroundColor: ThemeNew.backgroundColor
- property color textColor: ThemeNew.textColor
- property color secondaryTextColor: ThemeNew.secondaryTextColor
- property color drawerColor: ThemeNew.drawerColor
- property color contrastAccentColor: ThemeNew.contrastAccentColor
- property color lightDrawerColor: ThemeNew.lightDrawerColor
-
- }
-
onWidthChanged: {
manager.appendTextToLog("Window width changed to " + width + " orientation " + Screen.primaryOrientation)
if (placeHolder.initialWidth !== undefined) {
diff --git a/mobile-widgets/themeinterface.cpp b/mobile-widgets/themeinterface.cpp
index d7c9e4456..e6254c6de 100644
--- a/mobile-widgets/themeinterface.cpp
+++ b/mobile-widgets/themeinterface.cpp
@@ -74,7 +74,7 @@ themeInterface *themeInterface::instance()
void themeInterface::setup(QQmlContext *ct)
{
// Register interface class
- ct->setContextProperty("ThemeNew", instance());
+ ct->setContextProperty("subsurfaceTheme", instance());
// get current theme
m_currentTheme = qPrefDisplay::theme();