Commit graph

1074 commits

Author SHA1 Message Date
Dirk Hohndel
336decd30c mobile/UI: open dropdown on any tap for readonly combo box
This seems more intuitive. For editable combo boxes you need to tap on
the indicator, but for non-editable (readonly) ones, you can tap
anywhere and the dropdown is shown.
The code feels a bit clumsy, but seems to work in all cases.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-23 09:44:39 -08:00
Dirk Hohndel
bda1f0b6e1 mobile/UI: slight visual change to combo boxes
They always have a 10% darker background, and show a border if the combo
box has focus. This seems to look reasonably well in all situation we
use them.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-23 09:44:39 -08:00
Dirk Hohndel
bae1529fb7 mobile/UI: repaint the combobox indicator on color change
It seems that now all elements are correctly re-colored if the user changes
theme.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-23 09:44:39 -08:00
Dirk Hohndel
d9661a7be8 mobile/UI: initialize Kirigami theme to use our colors
With this we should finally get the correct button colors even when
switching color theme.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-23 09:44:39 -08:00
Dirk Hohndel
4dc1b4ef4a mobile/UI: update location combobox for dive edit
This one was missed in commit

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-23 09:44:39 -08:00
Dirk Hohndel
83acb98886 mobile UI: make TemplateComboBox selectively editable
Getting the visual right is really hard. The anchors seem to mostly work,
but it still doesn't look exactly right, IMHO.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-23 09:44:39 -08:00
Dirk Hohndel
ee0ca3995e mobile/UI: fix trip details padding
Incorrect reference to the Kirigami Units.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-23 09:44:39 -08:00
Dirk Hohndel
dbb6256b67 mobile/UI: make trip details edit theme aware
This got forgotten earlier.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-21 14:01:08 -08:00
Dirk Hohndel
052a46b562 mobile/UI: again, correct side button colors
I am confused how this worked and then got broken, but this appears to
once again fix the colors.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-21 13:57:13 -08:00
Dirk Hohndel
40a0916de8 mobile/UI: stop using removed Kirigami interface
hidePassiveNotification() is no longer supported.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-21 13:44:53 -08:00
Dirk Hohndel
bed11f79a1 mobile: remove non-functional code
This never ever worked to trigger a profile update. The code is
nonsensical as we cannot access the QMLProfile in a model delegate this
way from outside the delegate.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-21 13:12:37 -08:00
Dirk Hohndel
1228dec19f mobile/profile: directly set up the diveId
The weird 'Component.onCompleted' always felt like the wrong way to do
this. Setting this directly from the model seems like the much cleaner
solution.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-21 13:12:37 -08:00
Dirk Hohndel
f8b354d64d mobile/UI: remove incorrect code in ComboBox
This actually created a recursive dependency - I didn't see any negative
visual effect, but lots of annoying warnings.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20 19:54:51 -08:00
Dirk Hohndel
7fc4ec1163 mobile/UI: fix theming of combo boxes in dive edit
Again, not using our template combo box.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20 18:04:57 -08:00
Dirk Hohndel
4995c141c6 mobile/UI: make dive download combo boxes theme aware
In reality I should make our TemplateComboBox capable of handling the
modifications needed here without yet another reimplementation. Maybe
I'll do that next. This at least makes things look right.

A couple of odd whitespace changes snuck in at the end.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20 17:20:02 -08:00
Dirk Hohndel
535a15e5fd mobile/UI: make filter entry / dives shown theme aware
Again, not using our text field / label (plus adding a subdued color for
the placeholder text).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20 17:14:07 -08:00
Dirk Hohndel
68a15b8cdf mobile/UI: cloud credentials follow our theming
This was simply not using our labels / text fields, so it didn't pick up
our colors automatically.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20 17:08:21 -08:00
Dirk Hohndel
5979292469 mobile/UI: correctly theme combo boxes
Again, the fact that you basically need to completely reimplement the
ComboBox in order to change some colors is frustrating.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20 10:51:18 -08:00
Dirk Hohndel
fe283857e1 mobile UI: style check boxes and radio boxes
This is needed for the Export page.
And may I say for the record that it's rather surprising that in order
to change the color of one of those elements one ends up having to
completely re-implement them.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20 10:51:18 -08:00
Dirk Hohndel
b0193f79d0 mobile/UI: fix dive summary for dark theme
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20 10:51:18 -08:00
Dirk Hohndel
b3c80c5ae0 mobile/UI: use theme colors for startup text and location warning
This now looks right for the dark theme.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20 10:51:18 -08:00
Dirk Hohndel
3429552433 mobile/UI: correctly color the action button icons for dive list
This uses one of our fixes to Kirigami to allows us to set the correct
overlay color for our icons.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20 10:51:18 -08:00
Dirk Hohndel
0b52d7a398 mobile/UI: correctly color the action button icons for dive view
This uses one of our changes to Kirigami that allows us to set the
correct overlay color for our icons.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20 10:51:18 -08:00
Dirk Hohndel
d0d867d80a mobile/UI: correctly theme the global and context drawers
This requires more changes to Kirigami, but with this we get dark
drawers (the menus that slide in from the side) in the dark theme.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20 10:51:18 -08:00
Dirk Hohndel
00cb5dd834 mobile/UI: ensure we show a line between dives
In the dive list the rendering of the line ended up being subject to
rounding errors. With this change we ensure that the thin line is always
shown.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20 10:51:18 -08:00
Dirk Hohndel
31b28a31a9 mobile/UI: shrink dive log date button
This was too big relative to the page layout.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20 10:51:18 -08:00
Dirk Hohndel
791daa67b1 mobile/UI: remove the thick line between trips
This took up a lot of space and made the UI look stodgy.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20 10:51:18 -08:00
Dirk Hohndel
241d6105c0 mobile: fix implementation of menu back feature
With the updates to Kirigami I slightly modified the hack that we use to
implement that, as a result we call pop() directly on the globalDrawer.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17 09:17:54 -08:00
Dirk Hohndel
1f9fa8b462 mobile: avoid warning in QML code
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17 09:17:54 -08:00
Dirk Hohndel
35ca8e4c66 mobile: don't use reserved word
This used to work, but with current QML/Kirigami it throws an error.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17 09:17:54 -08:00
Dirk Hohndel
0e7fd632c1 mobile: silly whitespace cleanup
Simply because it bugged me.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17 09:17:54 -08:00
Dirk Hohndel
0851224b6c mobile/kirigami: first steps to switching to Kirigami 5.76
Our half-assed manual build of Kirigami was becoming completely unmaintainable.
So let's try to use the build method that the Kirigami team recommends. Which
unfortunately requires us to have access to the KDE extra cmake modules (ECM).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17 09:17:54 -08:00
Dirk Hohndel
360123d432 mobile: add missing word to location warning
Thanks to Johan, one of our Swedish translators for noticing this
oversight.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-11-05 14:22:15 -08:00
Dirk Hohndel
28107efd30 mobile: show location service warning
Google play now requires that we show an explicit notification when turning
on background location. This is an attempt to fulfill that requirement - we
won't know if this is 'good enough' until we submit the app, though.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-24 09:47:37 -07:00
Dirk Hohndel
4638936a22 mobile: show text with location service icon
I don't recall why we removed that text, but this makes it much clearer
that the service is active.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-24 09:47:37 -07:00
Dirk Hohndel
b3e28eed5d Update translations from Transifex
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-06 14:58:21 -07:00
Dirk Hohndel
ebcfb46d8c mobile/dive-edit: fix incorrect handling of multi tank gas mixes
A silly copy and paste error caused us to overwrite the gas mixes for
all the tanks with the gas mix in the first tank.

Fixes #2913

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-08-16 16:23:19 -07:00
Dirk Hohndel
4ec62441c1 mobile/download: don't allow download without connection set
It appears that multi line attributes silently fail. Without this change, the Download
button is enabled if vendor and product are chosen, even if there isn't a connection
selected. With this change (having all three conditions on the same line) the code
works as expected.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-07-14 10:57:10 -07:00
Dirk Hohndel
5ff08598ca mobile: show sync state in menu plate
This seems like the easiest way to show the state without disrupting the UI
elsewhere. Directly below the email address used for cloud storage.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-06-14 13:35:33 -07:00
Dirk Hohndel
8a4a9382d3 mobile/dive-details: restrict width of tags field
Having a lot of tags (or more precisely, a tags string that is very long) could
cause the width of the dive details view to extend past the width of the the
page. The txtTags label was missing a maximum width, and to make the result
more useful, I also added correct wrapping and elide to the mix (stupidly, we
had the wrap and width for the fixed name of the field ('Tags'), but not for
the user determined content of that field).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-06-08 12:27:50 -07:00
Dirk Hohndel
e00e72d430 mobile: add option to merge local cloud cache data
The UI is ugly, and of course this is hidden in the developer options that have
to first be enabled in the advanced settings. As I mentioned in the previous
commit, I believe the actual risk that something gets damaged here is very low,
but still, explaining this so it makes sense to the casual user may be a bit...
difficult.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-06-07 19:47:52 -07:00
Dirk Hohndel
8b167c14ad mobile: tiny whitespace update
Every time I edit main.qml, QtCreator fixes this for me. And then I filter it
from the commit to not mix white space and actual changes. So let's just get
this fixed and move on.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-06-07 19:47:52 -07:00
Dirk Hohndel
afdcccc9fe mobile/dive-edit: fix broken editable combo boxes
This is a partial revert of commit 99438121c4 ("mobile/dive-edit: use template
components and theme colors")

Clearly the information given in the Qt documentation on how to theme ComboBox
is flat out broken. The trade-off between 'better dark theme' and 'broken user
experience' is fairly easy to make.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-05-30 11:19:54 -07:00
Dirk Hohndel
99438121c4 mobile/dive-edit: use template components and theme colors
Another small step to make the dark theme at least marginally useful.
We now use our template components and add the necessary elements to have
consistent text color.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-05-18 13:00:03 -07:00
Dirk Hohndel
58d97c571d mobile/UI: correctly theme template spin box
This was all hard coded and wrong.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-05-18 13:00:03 -07:00
Dirk Hohndel
4798382e70 mobile/dc-download: fix dark theme appearance
I noticed that the download from dive computer page looked especially bad
in the dark theme (a user sent us some screenshots for a different reason)
and a quick look at the sources showed that we weren't using our template
label. Switching to that gives us the correct size by default so we can
drop all those explicit font size parameters. And we get the correct color
as used in the theme.

One random whitespace cleanup snuck into this commit. Oh well.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-05-18 13:00:03 -07:00
Dirk Hohndel
f6b09dd8c3 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-14 12:57:08 -07:00
Dirk Hohndel
6f96edd766 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-14 12:57:08 -07:00
Dirk Hohndel
6e47bb11d5 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-14 12:57:08 -07:00
Dirk Hohndel
7720e97db5 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-14 12:57:08 -07:00