aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mobile-widgets/qml/DiveDetailsView.qml1
-rw-r--r--mobile-widgets/qml/DownloadedDiveDelegate.qml20
-rw-r--r--mobile-widgets/qml/GpsList.qml11
-rw-r--r--mobile-widgets/qml/main.qml42
-rw-r--r--mobile-widgets/qml/mobile-resources.qrc1
-rwxr-xr-xscripts/mobilecomponents.sh1
6 files changed, 72 insertions, 4 deletions
diff --git a/mobile-widgets/qml/DiveDetailsView.qml b/mobile-widgets/qml/DiveDetailsView.qml
index adea41168..0e5c90de6 100644
--- a/mobile-widgets/qml/DiveDetailsView.qml
+++ b/mobile-widgets/qml/DiveDetailsView.qml
@@ -70,6 +70,7 @@ Item {
Kirigami.Label {
id: buttonText
text: qsTr("Map it")
+ visible: dive.gps !== ""
color: subsurfaceTheme.darkerPrimaryTextColor
anchors {
horizontalCenter: parent.horizontalCenter
diff --git a/mobile-widgets/qml/DownloadedDiveDelegate.qml b/mobile-widgets/qml/DownloadedDiveDelegate.qml
index 630382e34..f6ed3c663 100644
--- a/mobile-widgets/qml/DownloadedDiveDelegate.qml
+++ b/mobile-widgets/qml/DownloadedDiveDelegate.qml
@@ -36,6 +36,26 @@ Kirigami.AbstractListItem {
checked: innerListItem.selected;
width: childrenRect.heigh - Kirigami.Units.smallSpacing;
height: childrenRect.heigh - Kirigami.Units.smallSpacing;
+ indicator: Rectangle {
+ visible: diveIsSelected
+ implicitWidth: 20
+ implicitHeight: 20
+ x: isBluetooth.leftPadding
+ y: parent.height / 2 - height / 2
+ radius: 4
+ border.color: diveIsSelected.down ? subsurfaceTheme.PrimaryColor : subsurfaceTheme.darkerPrimaryColor
+ color: subsurfaceTheme.backgroundColor
+
+ Rectangle {
+ width: 12
+ height: 12
+ x: 4
+ y: 4
+ radius: 3
+ color: diveIsSelected.down ? subsurfaceTheme.PrimaryColor : subsurfaceTheme.darkerPrimaryColor
+ visible: diveIsSelected && diveIsSelected.checked
+ }
+ }
}
Item {
id: diveListEntry
diff --git a/mobile-widgets/qml/GpsList.qml b/mobile-widgets/qml/GpsList.qml
index 5ed641481..7ad97e14c 100644
--- a/mobile-widgets/qml/GpsList.qml
+++ b/mobile-widgets/qml/GpsList.qml
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
-import QtQuick 2.3
+import QtQuick 2.6
+import QtQuick.Controls 2.0
import QtQuick.Window 2.2
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1
@@ -26,40 +27,48 @@ Kirigami.ScrollablePage {
width: parent.width
Kirigami.Label {
text: qsTr('Date: ')
+ color: subsurfaceTheme.textColor
opacity: 0.6
font.pointSize: subsurfaceTheme.smallPointSize
}
Kirigami.Label {
text: date
+ color: subsurfaceTheme.textColor
Layout.preferredWidth: Math.max(parent.width / 5, paintedWidth)
font.pointSize: subsurfaceTheme.smallPointSize
}
Kirigami.Label {
text: qsTr('Name: ')
+ color: subsurfaceTheme.textColor
opacity: 0.6
font.pointSize: subsurfaceTheme.smallPointSize
}
Kirigami.Label {
text: name
+ color: subsurfaceTheme.textColor
Layout.preferredWidth: Math.max(parent.width / 5, paintedWidth)
font.pointSize: subsurfaceTheme.smallPointSize
}
Kirigami.Label {
text: qsTr('Latitude: ')
+ color: subsurfaceTheme.textColor
opacity: 0.6
font.pointSize: subsurfaceTheme.smallPointSize
}
Kirigami.Label {
text: latitude
+ color: subsurfaceTheme.textColor
font.pointSize: subsurfaceTheme.smallPointSize
}
Kirigami.Label {
text: qsTr('Longitude: ')
+ color: subsurfaceTheme.textColor
opacity: 0.6
font.pointSize: subsurfaceTheme.smallPointSize
}
Kirigami.Label {
text: longitude
+ color: subsurfaceTheme.textColor
font.pointSize: subsurfaceTheme.smallPointSize
}
}
diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml
index e870bfc9b..2cce06607 100644
--- a/mobile-widgets/qml/main.qml
+++ b/mobile-widgets/qml/main.qml
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
import QtQuick 2.4
import QtQuick.Controls 2.0
+import QtQuick.Controls.Material 2.1
import QtQuick.Window 2.2
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1
@@ -287,6 +288,25 @@ if you have network connectivity and want to sync your data to cloud storage."),
onCheckedChanged: {
manager.locationServiceEnabled = checked;
}
+ indicator: Rectangle {
+ implicitWidth: 20
+ implicitHeight: 20
+ x: locationCheckbox.leftPadding
+ y: parent.height / 2 - height / 2
+ radius: 4
+ border.color: locationCheckbox.down ? subsurfaceTheme.PrimaryColor : subsurfaceTheme.darkerPrimaryColor
+ color: subsurfaceTheme.drawerColor
+
+ Rectangle {
+ width: 12
+ height: 12
+ x: 4
+ y: 4
+ radius: 3
+ color: locationCheckbox.down ? subsurfaceTheme.PrimaryColor : subsurfaceTheme.darkerPrimaryColor
+ visible: locationCheckbox && locationCheckbox.checked
+ }
+ }
}
Kirigami.Label {
x: Kirigami.Units.gridUnit * 1.5
@@ -305,6 +325,8 @@ if you have network connectivity and want to sync your data to cloud storage."),
}
function blueTheme() {
+ Material.theme = Material.Light
+ Material.accent = subsurfaceTheme.blueDarkerPrimaryColor
subsurfaceTheme.currentTheme = "Blue"
subsurfaceTheme.darkerPrimaryColor = subsurfaceTheme.blueDarkerPrimaryColor
subsurfaceTheme.darkerPrimaryTextColor= subsurfaceTheme.blueDarkerPrimaryTextColor
@@ -316,9 +338,12 @@ if you have network connectivity and want to sync your data to cloud storage."),
subsurfaceTheme.textColor = subsurfaceTheme.blueTextColor
subsurfaceTheme.secondaryTextColor = subsurfaceTheme.blueSecondaryTextColor
manager.setStatusbarColor(subsurfaceTheme.darkerPrimaryColor)
+ subsurfaceTheme.drawerColor = subsurfaceTheme.lightDrawerColor
}
function pinkTheme() {
+ Material.theme = Material.Light
+ Material.accent = subsurfaceTheme.pinkDarkerPrimaryColor
subsurfaceTheme.currentTheme = "Pink"
subsurfaceTheme.darkerPrimaryColor = subsurfaceTheme.pinkDarkerPrimaryColor
subsurfaceTheme.darkerPrimaryTextColor = subsurfaceTheme.pinkDarkerPrimaryTextColor
@@ -330,9 +355,12 @@ if you have network connectivity and want to sync your data to cloud storage."),
subsurfaceTheme.textColor = subsurfaceTheme.pinkTextColor
subsurfaceTheme.secondaryTextColor = subsurfaceTheme.pinkSecondaryTextColor
manager.setStatusbarColor(subsurfaceTheme.darkerPrimaryColor)
+ subsurfaceTheme.drawerColor = subsurfaceTheme.lightDrawerColor
}
function darkTheme() {
+ Material.theme = Material.Dark
+ Material.accent = subsurfaceTheme.darkDarkerPrimaryColor
subsurfaceTheme.currentTheme = "Dark"
subsurfaceTheme.darkerPrimaryColor = subsurfaceTheme.darkDarkerPrimaryColor
subsurfaceTheme.darkerPrimaryTextColor= subsurfaceTheme.darkDarkerPrimaryTextColor
@@ -344,6 +372,7 @@ if you have network connectivity and want to sync your data to cloud storage."),
subsurfaceTheme.textColor = subsurfaceTheme.darkTextColor
subsurfaceTheme.secondaryTextColor = subsurfaceTheme.darkSecondaryTextColor
manager.setStatusbarColor(subsurfaceTheme.darkerPrimaryColor)
+ subsurfaceTheme.drawerColor = subsurfaceTheme.darkDrawerColor
}
QtObject {
@@ -362,6 +391,7 @@ if you have network connectivity and want to sync your data to cloud storage."),
property color backgroundColor
property color textColor
property color secondaryTextColor
+ property color drawerColor
// colors for the blue theme
property color blueDarkerPrimaryColor: "#303F9f"
@@ -375,7 +405,7 @@ if you have network connectivity and want to sync your data to cloud storage."),
property color blueSecondaryTextColor: "#757575"
// colors for the pink theme
- property color pinkDarkerPrimaryColor: "#FF1493"
+ property color pinkDarkerPrimaryColor: "#C2185B"
property color pinkDarkerPrimaryTextColor: "#ECECEC"
property color pinkPrimaryColor: "#FF69B4"
property color pinkPrimaryTextColor: "#212121"
@@ -392,19 +422,25 @@ if you have network connectivity and want to sync your data to cloud storage."),
property color darkPrimaryTextColor: "#ECECEC"
property color darkLightPrimaryColor: "#C5CAE9"
property color darkLightPrimaryTextColor: "#212121"
- property color darkBackgroundColor: "#000000"
+ property color darkBackgroundColor: "#303030"
property color darkTextColor: darkPrimaryTextColor
property color darkSecondaryTextColor: "#757575"
property color contrastAccentColor: "#FF5722" // used for delete button
+ property color lightDrawerColor: "#FFFFFF"
+ property color darkDrawerColor: "#424242"
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 darkerPrimaryColor })
- Kirigami.Theme.highlighedTextColor = Qt.binding(function() { return darkerPrimaryTextColor })
+ 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 darkerPrimaryColor })
+ Kirigami.Theme.viewBackgroundColor = Qt.binding(function() { return drawerColor })
+ Kirigami.Theme.viewTextColor = Qt.binding(function() { return textColor })
+ Kirigami.Theme.buttonBackgroundColor = Qt.binding(function() { return darkerPrimaryColor })
+ Kirigami.Theme.buttonTextColor = Qt.binding(function() { return textColor })
// this needs to pick the theme from persistent preference settings
var theme = manager.theme
diff --git a/mobile-widgets/qml/mobile-resources.qrc b/mobile-widgets/qml/mobile-resources.qrc
index 6fd506219..de14c7c05 100644
--- a/mobile-widgets/qml/mobile-resources.qrc
+++ b/mobile-widgets/qml/mobile-resources.qrc
@@ -29,6 +29,7 @@
<file alias="icons/go-previous.svg">kirigami/icons/go-previous.svg</file>
<file alias="icons/go-up.svg">kirigami/icons/go-up.svg</file>
<file alias="icons/handle-left.svg">kirigami/icons/handle-left.svg</file>
+ <file alias="icons/handle-right.svg">kirigami/icons/handle-right.svg</file>
<file alias="icons/distribute-horizontal-x.svg">kirigami/icons/distribute-horizontal-x.svg</file>
<file alias="icons/document-edit.svg">kirigami/icons/document-edit.svg</file>
<file alias="icons/document-save.svg">kirigami/icons/document-save.svg</file>
diff --git a/scripts/mobilecomponents.sh b/scripts/mobilecomponents.sh
index 267b44515..15a6613d7 100755
--- a/scripts/mobilecomponents.sh
+++ b/scripts/mobilecomponents.sh
@@ -67,6 +67,7 @@ cp $BREEZE/icons/actions/22/gps.svg $MC/icons
cp $BREEZE/icons/actions/24/trash-empty.svg $MC/icons
cp $BREEZE/icons/actions/24/list-add.svg $MC/icons
cp $BREEZE/icons/actions/22/handle-left.svg $MC/icons
+cp $BREEZE/icons/actions/22/handle-right.svg $MC/icons
# kirigami now needs the breeze-icons internally as well
pushd $MC