Compare commits

...

7 Commits

Author SHA1 Message Date
Dirk Hohndel
ebcb796c80 Update CHANGELOG
This includes cleaning up the old CHANGELOG I forgot to delete for the release
as well as mentioning the libdivecompute updates.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-05-12 07:59:52 -07:00
Dirk Hohndel
41b0c135c4 mobile/dive-details: show tags
So far the user can't edit them, but at least they are now shown as
part of the dive details. Usage of tags varries widely, I've seen
people who use a LOT of tags to classify their dives, so I'm giving
this a complete row by itself.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-05-12 07:57:47 -07:00
Dirk Hohndel
08d8d97630 mobile/models: add access to tags string
We already allow filtering by tags, but don't even show them on mobile.
That seems rather inconsistent.
First step is to make the tags available to the QML layer.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-05-12 07:57:47 -07:00
Dirk Hohndel
1ec599fa20 mobile/dive-details: less whitespace at the top
This always seemed odd - the location looked like it sat 'low' on the
screen.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-05-11 12:19:07 -07:00
Dirk Hohndel
d25da33677 mobile/dive-details: use our labels to create denser display
This makes better use of the screen real estate, without (IMHO) seeming
too crowded. This is a tough balance to strike.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-05-11 12:19:07 -07:00
Dirk Hohndel
00938578c1 mobile: reduce vertical white space around labels
Our labels all seem to have a lot of empty vertical space around them.
Try to be a bit more conservative with space.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-05-11 12:19:07 -07:00
Dirk Hohndel
325cb42fbb mobile: add smaller, vertically dense template label
By default single line text has too much white space around it. This
smaller, denser label works well to more efficiently use screen real
estate, I think.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-05-11 12:19:06 -07:00
8 changed files with 96 additions and 69 deletions

View File

@ -1,53 +1,12 @@
Mobile: show dive tags on dive details page
Desktop: update SAC fields and other statistics when editing cylinders
Desktop: Reconnect the variations checkbox in planner
Desktop: add support for dive mode on CSV import and export
Desktop: fix profile display of planned dives with surface segments
maps: show the dive site as marker when opening Google Maps
Mobile: fix false rejection of Subsurface cloud SSL certificate
Mobile: fix misdetection of Shearwater Petrel 2 on iOS
Desktop: fix creation of new cylinder types (names couldn't be the start of already existing names)
Mobile: fix no-cloud to cloud transition
Mobile: remove locking of data storage access
Mobile: performance improvements for dive list
Mobile: user notification of progress during startup
Mobile: ensure filter text field has focus when opened
Mobile: dive summary: make time drop downs smaller
Mobile: close menus with Android back button on dive details
Mobile: add ability to toggle dive invalid flag from dive details context menu
Mobile: calculate dive summary statistics in 64 bit values even on 32bit ARM
Mobile: fix strange issue where sometimes the keyboard would pop up in dive view mode
Mobile: remove 'map it' button on dive view page - it was redundant and took space from location field
Mobile: show better placeholder text while processing dive list
Mobile: Android: don't quit the app when trying to close a drawer/menu with back button
Mobile: make sure filter header and virtual keyboard are shown when tapping on filter icon
Mobile: fix issue where in some circumstances changes weren't written to storage
Mobile: fix issues with filtering while editing dives
Desktop: implement dive invalidation
Undo: implement undo of event handling (viz. bookmarks, setpoints, gas switches)
Desktop: fix tab-order in filter widget
Desktop: implement fulltext search
Desktop: add starts-with and exact filter modes for textual search
Desktop: ignore dive sites without location in proximity search
Desktop: add the ability to modify dive salinity
Profile: Add current GF to infobox
Desktop: increase speed of multi-trip selection
Desktop/Linux: fix issue with Linux AppImage failing to communicate with Bluetooth dive computers [#2370]
Desktop: allow copy&pasting of multiple cylinders [#2386]
Desktop: don't output random SAC values for cylinders without data [#2376]
Planner: Add checkbox on considering oxygen narcotic
Planner: Improve rounding of stop durations in planner notes
Desktop: register changes when clicking "done" on dive-site edit screen
Core: support dives with no cylinders
Core: remove restriction on number of cylinders
Desktop: make dive replanning undoable
Desktop: update statistics tab on undo or redo
Planner: update dive details when replanning dive [#2280]
Export: when exporting dive sites in dive site mode, export selected dive sites [#2275]
libdivecomputer:
- Add support for the Oceanic Geo 4.0
- clean up Shearwater tank pressure handling
- minor fixlets
libdivecomputer:
- work around Pelagic BLE oddity (Oceanic Pro Plus X and Aqualung i770R)
- OSTC3 firmware update improvements
---
* Always add new entries at the very top of this file above other existing entries and this note.

View File

@ -31,6 +31,8 @@ Item {
width: parent.width - Kirigami.Units.gridUnit
height: childrenRect.height - Kirigami.Units.smallSpacing
anchors.left: parent.left
anchors.top: detailsView.top
anchors.topMargin: - Kirigami.Units.smallSpacing
Controls.Label {
id: locationText
text: (undefined !== location && "" !== location) ? location : qsTr("<unnamed dive site>")
@ -63,26 +65,26 @@ Item {
}
Controls.Label {
TemplateLabel {
text: dateTime
width: Math.max(locationText.width * 0.45, paintedWidth)
font.pointSize: subsurfaceTheme.smallPointSize
color: subsurfaceTheme.textColor
}
// spacer, just in case
Controls.Label {
TemplateLabel {
text: " "
width: Kirigami.Units.largeSpacing
}
// let's try to show the depth / duration very compact
Controls.Label {
TemplateLabel {
text: depthDuration
width: Math.max(Kirigami.Units.gridUnit * 3, paintedWidth)
font.pointSize: subsurfaceTheme.smallPointSize
color: subsurfaceTheme.textColor
}
}
Controls.Label {
TemplateLabel {
id: numberText
text: "#" + number
font.pointSize: subsurfaceTheme.smallPointSize
@ -99,7 +101,7 @@ Item {
top: numberText.bottom
topMargin: Kirigami.Units.smallSpacing
}
Controls.Label {
TemplateLabelSmall {
id: ratingText
text: qsTr("Rating:")
font.pointSize: subsurfaceTheme.smallPointSize
@ -109,6 +111,7 @@ Item {
width: height
height: subsurfaceTheme.regularPointSize
anchors.verticalCenter: ratingText.verticalCenter
anchors.verticalCenterOffset: height * 0.2
source: (rating >= 1) ? ":/icons/ic_star.svg" : ":/icons/ic_star_border.svg"
color: subsurfaceTheme.textColor
}
@ -116,6 +119,7 @@ Item {
width: height
height: subsurfaceTheme.regularPointSize
anchors.verticalCenter: ratingText.verticalCenter
anchors.verticalCenterOffset: height * 0.2
source: (rating >= 2) ? ":/icons/ic_star.svg" : ":/icons/ic_star_border.svg"
color: subsurfaceTheme.textColor
}
@ -123,6 +127,7 @@ Item {
width: height
height: subsurfaceTheme.regularPointSize
anchors.verticalCenter: ratingText.verticalCenter
anchors.verticalCenterOffset: height * 0.2
source: (rating >= 3) ? ":/icons/ic_star.svg" : ":/icons/ic_star_border.svg"
color: subsurfaceTheme.textColor
}
@ -130,6 +135,7 @@ Item {
width: height
height: subsurfaceTheme.regularPointSize
anchors.verticalCenter: ratingText.verticalCenter
anchors.verticalCenterOffset: height * 0.2
source: (rating >= 4) ? ":/icons/ic_star.svg" : ":/icons/ic_star_border.svg"
color: subsurfaceTheme.textColor
}
@ -137,6 +143,7 @@ Item {
width: height
height: subsurfaceTheme.regularPointSize
anchors.verticalCenter: ratingText.verticalCenter
anchors.verticalCenterOffset: height * 0.2
source: (rating === 5) ? ":/icons/ic_star.svg" : ":/icons/ic_star_border.svg"
color: subsurfaceTheme.textColor
}
@ -147,7 +154,7 @@ Item {
top: numberText.bottom
topMargin: Kirigami.Units.smallSpacing
}
Controls.Label {
TemplateLabelSmall {
id: visibilityText
text: qsTr("Visibility:")
font.pointSize: subsurfaceTheme.smallPointSize
@ -157,6 +164,7 @@ Item {
width: height
height: subsurfaceTheme.regularPointSize
anchors.verticalCenter: visibilityText.verticalCenter
anchors.verticalCenterOffset: height * 0.2
source: (viz >= 1) ? ":/icons/ic_star.svg" : ":/icons/ic_star_border.svg"
color: subsurfaceTheme.textColor
}
@ -164,6 +172,7 @@ Item {
width: height
height: subsurfaceTheme.regularPointSize
anchors.verticalCenter: visibilityText.verticalCenter
anchors.verticalCenterOffset: height * 0.2
source: (viz >= 2) ? ":/icons/ic_star.svg" : ":/icons/ic_star_border.svg"
color: subsurfaceTheme.textColor
}
@ -171,6 +180,7 @@ Item {
width: height
height: subsurfaceTheme.regularPointSize
anchors.verticalCenter: visibilityText.verticalCenter
anchors.verticalCenterOffset: height * 0.2
source: (viz >= 3) ? ":/icons/ic_star.svg" : ":/icons/ic_star_border.svg"
color: subsurfaceTheme.textColor
}
@ -178,6 +188,7 @@ Item {
width: height
height: subsurfaceTheme.regularPointSize
anchors.verticalCenter: visibilityText.verticalCenter
anchors.verticalCenterOffset: height * 0.2
source: (viz >= 4) ? ":/icons/ic_star.svg" : ":/icons/ic_star_border.svg"
color: subsurfaceTheme.textColor
}
@ -185,6 +196,7 @@ Item {
width: height
height: subsurfaceTheme.regularPointSize
anchors.verticalCenter: visibilityText.verticalCenter
anchors.verticalCenterOffset: height * 0.2
source: (viz === 5) ? ":/icons/ic_star.svg" : ":/icons/ic_star_border.svg"
color: subsurfaceTheme.textColor
}
@ -331,7 +343,7 @@ Item {
}
}
}
Controls.Label {
TemplateLabelSmall {
id: noProfile
visible: noDive
Layout.fillWidth: true
@ -343,21 +355,21 @@ Item {
// first row
//-----------
Controls.Label {
TemplateLabelSmall {
text: qsTr("Suit:")
opacity: 0.6
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
Layout.maximumWidth: detailsView.col1Width
color: subsurfaceTheme.textColor
}
Controls.Label {
TemplateLabelSmall {
text: qsTr("Air Temp:")
opacity: 0.6
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
Layout.maximumWidth: detailsView.col2Width
color: subsurfaceTheme.textColor
}
Controls.Label {
TemplateLabelSmall {
text: qsTr("Water Temp:")
opacity: 0.6
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
@ -367,21 +379,21 @@ Item {
// second row
//------------
Controls.Label {
TemplateLabelSmall {
id: txtSuit
text: suit
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
Layout.maximumWidth: detailsView.col1Width
color: subsurfaceTheme.textColor
}
Controls.Label {
TemplateLabelSmall {
id: txtAirTemp
text: airTemp
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
Layout.maximumWidth: detailsView.col2Width
color: subsurfaceTheme.textColor
}
Controls.Label {
TemplateLabelSmall {
id: txtWaterTemp
text: waterTemp
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
@ -399,7 +411,7 @@ Item {
// thrid row
//------------
Controls.Label {
TemplateLabelSmall {
text: qsTr("Cylinder:")
opacity: 0.6
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
@ -407,7 +419,7 @@ Item {
Layout.bottomMargin: 0
color: subsurfaceTheme.textColor
}
Controls.Label {
TemplateLabelSmall {
text: qsTr("Weight:")
opacity: 0.6
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
@ -415,7 +427,7 @@ Item {
Layout.bottomMargin: 0
color: subsurfaceTheme.textColor
}
Controls.Label {
TemplateLabelSmall {
text: qsTr("SAC:")
opacity: 0.6
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
@ -426,21 +438,21 @@ Item {
// fourth row
//------------
Controls.Label {
TemplateLabelSmall {
id: txtCylinder
text: cylinder
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
Layout.maximumWidth: detailsView.col1Width
color: subsurfaceTheme.textColor
}
Controls.Label {
TemplateLabelSmall {
id: txtWeight
text: sumWeight
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
Layout.maximumWidth: detailsView.col2Width
color: subsurfaceTheme.textColor
}
Controls.Label {
TemplateLabelSmall {
id: txtSAC
text: sac
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
@ -458,7 +470,7 @@ Item {
// fifth row
//-----------
Controls.Label {
TemplateLabelSmall {
text: qsTr("Divemaster:")
opacity: 0.6
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
@ -466,7 +478,7 @@ Item {
Layout.bottomMargin: 0
color: subsurfaceTheme.textColor
}
Controls.Label {
TemplateLabelSmall {
text: qsTr("Buddy:")
opacity: 0.6
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
@ -478,14 +490,14 @@ Item {
// sixth row
//-----------
Controls.Label {
TemplateLabelSmall {
id: txtDiveMaster
text: diveMaster
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
Layout.maximumWidth: detailsView.col1Width
color: subsurfaceTheme.textColor
}
Controls.Label {
TemplateLabelSmall {
id: txtBuddy
text: buddy
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
@ -502,8 +514,40 @@ Item {
Layout.fillWidth: true
}
// seventh row
//------------
TemplateLabelSmall {
text: qsTr("Tags:")
opacity: 0.6
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
Layout.columnSpan: 3
Layout.maximumWidth: detailsView.col2Width + detailsView.col3Width
Layout.bottomMargin: 0
color: subsurfaceTheme.textColor
}
Controls.Label {
// eighth row
//------------
TemplateLabelSmall {
id: txtTags
text: tags
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
Layout.columnSpan: 3
color: subsurfaceTheme.textColor
}
Rectangle {
color: subsurfaceTheme.primaryColor
height: 1
opacity: 0.5
Layout.columnSpan: 3
Layout.fillWidth: true
}
// Notes on the bottom
//--------------------
TemplateLabelSmall {
Layout.fillWidth: true
opacity: 0.6
text: qsTr("Notes")

View File

@ -6,6 +6,7 @@ Label {
id: myLabel
color: subsurfaceTheme.textColor
font.pointSize: subsurfaceTheme.regularPointSize
lineHeight: 0.8
property alias colorBackground: myLabelBackground.color
background: Rectangle {

View File

@ -0,0 +1,19 @@
// SPDX-License-Identifier: GPL-2.0
import QtQuick 2.11
import QtQuick.Controls 2.4
Label {
id: myLabel
color: subsurfaceTheme.textColor
font.pointSize: subsurfaceTheme.smallPointSize
lineHeight: 0.6
property alias colorBackground: myLabelBackground.color
background: Rectangle {
id: myLabelBackground
implicitWidth: myLabel.width
implicitHeight: myLabel.width
color: subsurfaceTheme.backgroundColor
}
}

View File

@ -5,6 +5,7 @@
<file>TemplateCheckBox.qml</file>
<file>TemplateComboBox.qml</file>
<file>TemplateLabel.qml</file>
<file>TemplateLabelSmall.qml</file>
<file>TemplateLine.qml</file>
<file>TemplateRadioButton.qml</file>
<file>TemplatePage.qml</file>

View File

@ -222,6 +222,7 @@ QVariant DiveTripModelBase::diveData(const struct dive *d, int column, int role)
case MobileListModel::SumWeightRole: return get_weight_string(weight_t { total_weight(d) }, true);
case MobileListModel::DiveMasterRole: return d->divemaster ? d->divemaster : QString();
case MobileListModel::BuddyRole: return d->buddy ? d->buddy : QString();
case MobileListModel::TagsRole: return get_taglist_string(d->tag_list);
case MobileListModel::NotesRole: return formatNotes(d);
case MobileListModel::GpsRole: return d->dive_site ? printGPSCoords(&d->dive_site->location) : QString();
case MobileListModel::GpsDecimalRole: return format_gps_decimal(d);

View File

@ -33,6 +33,7 @@ QHash<int, QByteArray> MobileListModelBase::roleNames() const
roles[SumWeightRole] = "sumWeight";
roles[DiveMasterRole] = "diveMaster";
roles[BuddyRole] = "buddy";
roles[TagsRole] = "tags";
roles[NotesRole]= "notes";
roles[GpsRole] = "gps";
roles[GpsDecimalRole] = "gpsDecimal";

View File

@ -41,6 +41,7 @@ public:
SumWeightRole,
DiveMasterRole,
BuddyRole,
TagsRole,
NotesRole,
GpsDecimalRole,
GpsRole,