Add an explicit checkbox to the 'cloud auto synch' status toggle in the
mobile 'Dive Management' menu in order to make it more intuitive to
understand.
This isn't super pretty, but I think it will improve the usability. A
prettier way to achieve this will be to redesign the `ic_cloud_off.svg`
/ `ic_cloud_done.svg` in order to make them intuitively recognisable as
unchecked / checked checkboxes.
Example of a support request caused by confusion from the current
implementation: https://groups.google.com/g/subsurface-divelog/c/9X-hTt9NFlE/m/ZcqtdOOhBQAJ
Signed-off-by: Michael Keller <github@ike.ch>
Fix the issue that Gradient Factors cannot be set to 100 in the mobile
version. This is done by changing the edits from a text box to a spin
edit, which seems to be a better match for numerical values.
As a side effect this also solves the issue that the keyboard for the
text edit is not properly displayed when settings are opened when dive
details are already on the page stack.
Fixes#3911.
Reported-by: @gbetous
Signed-off-by: Michael Keller <github@ike.ch>
Not really relevant, because it only affects debugging output.
But shows why I dislike weakly typed, non-compiled languages.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Add an option for users to sync the dive computer time with the PC time
every time dives are downloaded.
Obviously this will only work on dive computers that have time
synchronisation support in libdivecomputer, for other computers a notice
is logged.
The selection for this option is persisted as a preference.
Signed-off-by: Michael Keller <github@ike.ch>
Instead of using the save file dialog (which creates a horrendous user
experience - and isn't even supported on Android), simply allow the user
to email the file in question to a recipient of their choice, e.g.,
themselves.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The export functionality is horridly poorly implemented, and the UDDF export
isn't actually functional on mobile. And why would we support this in the first
place? That's not a reasonable expectation for the mobile app.
So let's just completely remove that and good riddance.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This allows having 3m depth grid for metric users.
* All original properties ( named diferently ) were renamed to three_m_based_grid everywhere to be consistent.
* Plus other small changes requested during review.
Signed-off-by: Vlad A. <elf128@gmail.com>
Signed-off-by: Vlad A <elf128@gmail.com>
In general, replace "dive master" by "dive guide".
However, do not change written dive logs for now. On reading,
accept both versions.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Given the nonsense that Google and Apple makes us go through in order to
support this feature, it's time to cut our losses and walk away.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When viewing dives on mobile the notes field does not support rich
text. User formatting, output from the planning feature, etc will
render html as plain text.
Adding qml tag to support rich text
Signed-off-by: Josh Torres <torres.josh.j@gmail.com>
Prior to this change, we had two different cylinder lists as models for
drop down boxes - one that prepends the "no default cylinder" entry
(which we need for setting up no default cylinder to be used in the
app), and another one that only includes actual cylinders.
The problem occured if a dive is created before the first time we edit
an existing dive: in this case we are applying indices across the two
models, but the indices are of course off by one; this results in
actually picking the wrong cylinder. So each time we try to edit a dive,
we end up with the previous cylinder in the list.
This commit simplifies the code by having only one place where we create
list of cylinder names (which is then used as the model for the combo
box). It also uses more logical names for the two 'flavors' of this list
to make it clear which one is supposed to be used (the regular list when
editing or adding dives, the one with the "no default cylinder" entry
prependet for the Settings page).
Reported-by: Brian Fransen
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When strings in dive details wrap, the line spacing is too tight
in some circumstances. While not perfect, this change improves
the situation somewhat.
See #3263
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We already showed the tags, but we didn't allow the user to edit them.
This tries hard not to create inconsistent or illogical tags by trimming
white space and being careful with how the tags are added.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Since we no longer show the noisy git updates to the user, it has become
harder for them to know whether a sync to the cloud was successful.
Since a manual sync will never show the new 'what did you change and
here's how you undo it' notification, it seems easy enough to simply
show a status update.
This adds a passive notification with no action button after the user
either uses the main menu or pulling down on the dive list in order to
trigger a manual sync.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The goal is to enable a user experiencing crashes when applying GPS data
to their dive log to make all necessary data available to the
developers. Hopefully the clipboard is large enough to hold all the
data.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Simply force it to use the default font, which is bound to the
application font, which we SHOULD be updating when changing the regular
font size for the app, anyway.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Sometimes (and it's unclear why that happens) after rotation the stats
widget is blank. Setting the first variable back to itself appears
enough to ensure that the statistics view is redrawn. Try to do that
programatically after a short delay.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The statistics themselves still are in a light theme, but at least the
rest of the UI now works in both regular and dark themes.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is fun... with just a tiny bit of 'magic text parsing' we can allow
the backend code to add a button to the notification that will open the
context menu that will make it super obvious to the user how they can
undo an operation.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In commit 24eac8df87 ("mobile: remove overwriting of line special case
in ui-notification") the code doing the line replacement was removed,
but the comment above that code wasn't updated.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Having this as the right action button (same one used for 'cancel' in
the edit screen) made it too likely to inadvertantly delete a dive. And
outside of testing, wanting to delete a dive really shouldn't be all
that common an operation. So remove the function from the action button
and place it into the context menu instead, right next to the undo
action so the user also is aware that there is an undo option.
Suggested-by: Peter Zaal <peter.zaal@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The filler element was placed incorrectly (in a position already used)
and worse the logic for its sizing was wrong.
This gets rid of a warning and creates the intended layout.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
And wow isn't that a nice improvement in the code.
Also has the benefit of actually doing the right thing and not creating
unwanted white space for missing cylinders. And does away with all these
warnings about coercion (after all, we were checking against the wrong
value.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In commit 622e5aab69 ("mobile/cleanup: remove more noisy debug output")
I had good intentions, but missed the fact that in order to access the
'verbose' variable from QML I needed to use manager.verboseEnabled. The
resulting syntax error went unnoticed and broke the screen repositioning
when the keyboard opens on mobile devices.
Worse, I called a non existing method to do the logging of debug
information.
And to top it all off, when I fixed the positioning algorithm in commit
765c4f9704 ("mobile/UI: fix the logic to keep input visible"), I forgot
to fix the near identical logic for the TextArea for the notes.
Fail on so many levels.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This feels much more responsive to various screen widths to me.
Instead of a fixed grid this is now a Flow that is tries to make much
better use of the space available on the user's device. It's not always
perfect, but to me at least a massive improvement.
The commit is almost unreadable because of the re-indentation and the
move of a block of fields to earlier in the form (as that made it much
easier to flow everything). But with show -w you can get a better idea.
We have a Flow around all the fields, we pair each label with the
corresponding input field, and then have a few additional Flows to
ensure that the cylinders always start in the first column.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This makes the TextFields (and the editable ComboBoxes with them) have a
tighter visual experience.
It also moves the indicater closer to the right edge in the ComboBox and
doesn't use preferredWidth for the slim combo box as that implies a
maximum width which could lead to unnecessary clipping.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
QML and Kirigami trigger a change of our application window size if we
manually override the gridUnit. Which of course is NOT what we want, so
immediately undo that after changing the gridUnit to prevent bad side
effects.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The fact that the rescaling in the settings gave different results from
what we got after a restart really should have been a dead giveaway that
the code was fundamentally flawed.
With this, if the user picks smaller, regular, or larger they now always
get the same, consistent values for gridUnit and font sizes.
This also gives up on the idea that we can just force the gridUnit to be
smaller to make things work if the font (which drives the gridUnit) is
too big for a screen. That fundamentally cannot work and gives a
horrible UI experience. So instead simply warn the user and continue
with matching font / gridUnit, which will still give a bad experience,
but at least we told the user about it and didn't pretend this was ok or
fixable.
Finally, this gets the factors right when switching from smaller to
larger or back, without stopping at regular on the way.
One odd side effect of this code is that under certain conditions
(number of columns changes) the display window when running mobile on
desktop will resize. That's kind of odd, but as that is not /really/ our
target platform, for now I'd consider it acceptable. But it does deserve
more investigation.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
As it turns out, we used to get the font scaling completely wrong. As a
result we got got ~72% and ~132% instead of the intended 85% and 115%.
So now people have both options, in each case with matching gridUnit
(and therefore visual spacing), and font size.
Also visualize the font size by rendering the button text accordingly.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This seems harmless and obvious, but it shows that for the last however
many years our smaller/regular/larger font change was bogus and broken.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Adds fields to the advanced preferences page to modify GFLow and GFHigh for
the Buhlmann decompression model for calculating ceilings. Updated preferences
code to set the Buhlmann parameters in core/deco.c when the GF prefs are
updated.
Signed-off-by: Doug Junkins <douglas.junkins@gmail.com>
The repositioning message when a virtual keyboard opens is useful enough
to keep it and just hide it unless in verbose mode. The others have all
outlived their usefulness.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
First, the time zone adjustment was wrong - this as written could only
ever have worked in UTC or by pure chance.
Second, the order of alerting the UI of the availability of a GPS fix
was also incorrect creating a race between the UI and our data
structures.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Based on a dummy commit from Berthold, this provides a styled popup of
the available chart types for the current variables.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
That seems to be the most commonly usefule chart.
This also removes some noisy log messages; these were super useful
during development, but should have been merged.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
After spending so much time trying to make things work well on smaller
screens I completely missed that there was an off by one error making
the statistics display way too small on larger tablets in landscape mode.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>