summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/DiveDetailsView.qml
diff options
context:
space:
mode:
Diffstat (limited to 'mobile-widgets/qml/DiveDetailsView.qml')
-rw-r--r--mobile-widgets/qml/DiveDetailsView.qml88
1 files changed, 87 insertions, 1 deletions
diff --git a/mobile-widgets/qml/DiveDetailsView.qml b/mobile-widgets/qml/DiveDetailsView.qml
index 59670e618..9aa7326d0 100644
--- a/mobile-widgets/qml/DiveDetailsView.qml
+++ b/mobile-widgets/qml/DiveDetailsView.qml
@@ -66,6 +66,7 @@ Item {
}
}
Row {
+ id: dateRow
anchors {
left: locationText.left
top: locationText.bottom
@@ -96,6 +97,91 @@ Item {
top: locationText.bottom
}
}
+ Row {
+ anchors {
+ left: dateRow.left
+ top: numberText.bottom
+ }
+ Kirigami.Label {
+ id: ratingText
+ text: qsTr("Rating:")
+ font.pointSize: subsurfaceTheme.smallPointSize
+ color: subsurfaceTheme.textColor
+ }
+ Kirigami.Icon {
+ width: height
+ height: subsurfaceTheme.regularPointSize
+ anchors.verticalCenter: ratingText.verticalCenter
+ source: (dive.rating >= 1) ? "icons/ic_star.svg" : "icons/ic_star_border.svg"
+ }
+ Kirigami.Icon {
+ width: height
+ height: subsurfaceTheme.regularPointSize
+ anchors.verticalCenter: ratingText.verticalCenter
+ source: (dive.rating >= 2) ? "icons/ic_star.svg" : "icons/ic_star_border.svg"
+ }
+ Kirigami.Icon {
+ width: height
+ height: subsurfaceTheme.regularPointSize
+ anchors.verticalCenter: ratingText.verticalCenter
+ source: (dive.rating >= 3) ? "icons/ic_star.svg" : "icons/ic_star_border.svg"
+ }
+ Kirigami.Icon {
+ width: height
+ height: subsurfaceTheme.regularPointSize
+ anchors.verticalCenter: ratingText.verticalCenter
+ source: (dive.rating >= 4) ? "icons/ic_star.svg" : "icons/ic_star_border.svg"
+ }
+ Kirigami.Icon {
+ width: height
+ height: subsurfaceTheme.regularPointSize
+ anchors.verticalCenter: ratingText.verticalCenter
+ source: (dive.rating === 5) ? "icons/ic_star.svg" : "icons/ic_star_border.svg"
+ }
+ }
+ Row {
+ anchors {
+ right: numberText.right
+ top: numberText.bottom
+ }
+ Kirigami.Label {
+ id: visibilityText
+ text: qsTr("Visibility:")
+ font.pointSize: subsurfaceTheme.smallPointSize
+ color: subsurfaceTheme.textColor
+ }
+ Kirigami.Icon {
+ width: height
+ height: subsurfaceTheme.regularPointSize
+ anchors.verticalCenter: visibilityText.verticalCenter
+ source: (dive.visibility >= 1) ? "icons/ic_star.svg" : "icons/ic_star_border.svg"
+ }
+ Kirigami.Icon {
+ width: height
+ height: subsurfaceTheme.regularPointSize
+ anchors.verticalCenter: visibilityText.verticalCenter
+ source: (dive.visibility >= 2) ? "icons/ic_star.svg" : "icons/ic_star_border.svg"
+ }
+ Kirigami.Icon {
+ width: height
+ height: subsurfaceTheme.regularPointSize
+ anchors.verticalCenter: visibilityText.verticalCenter
+ source: (dive.visibility >= 3) ? "icons/ic_star.svg" : "icons/ic_star_border.svg"
+ }
+ Kirigami.Icon {
+ width: height
+ height: subsurfaceTheme.regularPointSize
+ anchors.verticalCenter: visibilityText.verticalCenter
+ source: (dive.visibility >= 4) ? "icons/ic_star.svg" : "icons/ic_star_border.svg"
+ }
+ Kirigami.Icon {
+ width: height
+ height: subsurfaceTheme.regularPointSize
+ anchors.verticalCenter: visibilityText.verticalCenter
+ source: (dive.visibility === 5) ? "icons/ic_star.svg" : "icons/ic_star_border.svg"
+ }
+ }
+
}
GridLayout {
id: bottomLayout
@@ -104,7 +190,7 @@ Item {
left: parent.left
right: parent.right
margins: Math.round(Kirigami.Units.gridUnit / 2)
- topMargin: Kirigami.Units.gridUnit * 2
+ topMargin: Kirigami.Units.gridUnit
}
columns: 3
rowSpacing: Kirigami.Units.smallSpacing * 2