Commit graph

316 commits

Author SHA1 Message Date
Dirk Hohndel
3a7ecc1a7f QML UI: make Preferences page scrollable
This commit only has the actual changes, the next commit will clean up
the white space in order to make it more obvious what was done.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 21:11:37 -07:00
Dirk Hohndel
6422932c61 QML UI: correctly wrap devinfo message
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 21:11:37 -07:00
Dirk Hohndel
7b922a1f72 QML UI: actually write libdc logfile
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 18:23:16 -07:00
Dirk Hohndel
dbb5826f2a QML UI: add preference for libdivecomputer log
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 18:08:36 -07:00
Dirk Hohndel
0a0c93e3b7 QML UI: add variable for libdc logfile
It seemed cleanest and easiest to have this in the QMLManager and
not in the DCDownload object.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 18:08:06 -07:00
Dirk Hohndel
ff659396c3 QML UI: fix typo in color values
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 18:06:12 -07:00
Dirk Hohndel
c59a74029b Android: write appLog to file
The trick is to pick a path that is accessible from other applications.
In theory QStandardPaths::GenericDataLocation should provide that.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 17:40:29 -07:00
Dirk Hohndel
9111ce01e7 QML UI: show progress messages on the download page
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 16:07:48 -07:00
Dirk Hohndel
8e0895e429 QML UI: Download from DC: disable misleading UI elements
These buttons only work when we successfully downloaded a dive. Also, don't
show a list of dives when there are no dives.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 16:07:03 -07:00
Dirk Hohndel
fd96daca6a QML UI: add progress message variable
To be shared between C/C++ and QML code in order to show the updates
and potential error messages from libdivecomputer.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 15:07:44 -07:00
Dirk Hohndel
d2a5bf87c4 QML UI: add dev_info data to AppLog
This should make it easier to tell how far we get downloading data
from dive computers.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 12:50:22 -07:00
Joakim Bygdell
22a0ebe45d QML UI: Style the gps checkbox
Style the gps checkbos on the dive edit page so it follows
theme coloring.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-09 03:06:04 +09:00
Joakim Bygdell
4698b86b13 QML UI: Style the radio buttons
This styles the radio  buttons in the preferences pane
so they follows the theme colors.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-09 03:06:04 +09:00
Joakim Bygdell
4c4b72853c QML UI: Style the BT download checkbox
Style the checkbox to the themes primary color

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-09 03:06:04 +09:00
Joakim Bygdell
aa5060669c QML UI: Style Dive Details View
Change the accent colors in the dive details view
to match the theme colors.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-09 03:06:04 +09:00
Joakim Bygdell
b9a05e501b QML UI: Style DC download buttons
Style the button in the DC download dialog so they follow
the theme colors.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-09 03:06:04 +09:00
Joakim Bygdell
12ac75c7dd QML UI: Proper button color
Make the "map it" button follow the theme color.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-09 03:06:04 +09:00
Dirk Hohndel
b1f4a2975f QML UI: better icon for download from dive computer
Thanks to Davide for paying for professional icon design.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-08 10:29:10 -07:00
Dirk Hohndel
c9c9a8390a QML UI: start BT discovery a tiny bit later
This way the AppLog starts with the name and version of Subsurface-mobile.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-06 09:34:37 -07:00
Dirk Hohndel
ce21c2a696 QML UI: drop AppLog title and add margin instead
The title was hidden under the title bar, anyway.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-06 09:34:37 -07:00
Dirk Hohndel
282698e5d2 QML UI: disable reachability mode
Latest Kirigami master allows us to turn off reachability mode. In
general this had been rather confusing to our users and it seems to
somewhat conflict with the pull down to refresh of the dive list.

Latest Kirigami also changes the behavior of refresh slightly, you now
need to pull "down" for at least 500ms before it triggers. So, with this
change and the latest Kirigami, hopefully the user experience for
refresh is good enough that we can consider keeping it enabled and use
it as an equivalent to manual sync (even in offline mode).

See #454
See #456

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-29 15:10:42 -07:00
Jan Mulder
d6446569af QML UI: only drag a pull down sync, and not flick it
Fast flicking to the top of the divelist triggers almost certainly a
pull down sync, as the default boundBehavior is DragAndOvershootBounds.
Despite being the default QML action, this leads to unwanted pull
down syncs (even in offline mode).

Setting the boundBehavior to DragOverBounds solves this issue. Now,
the user has to explicitly drag the top down to force a pull down
sync, and a accidental fast flick is stopped at the upper bound.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-06-29 23:21:55 +09:00
Dirk Hohndel
b459ccbff7 QML UI: DiveList: make download from DC main action
Now that we support this for many dive computers, that seem reasonable.
I'm not happy with the icon, but couldn't figure out a better one in the
breeze icon set.

See #426

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-27 22:18:26 -07:00
Dirk Hohndel
77f545b38e QML UI: Download from DC: move accept button to the right
So it doesn't conflict with the hamburger menu button / opening the
global drawer.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-25 16:12:45 -07:00
Dirk Hohndel
4963b27f52 QML UI: Download from DC: avoid assignments of undefined values
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-25 16:12:07 -07:00
Dirk Hohndel
fc2ca3a804 QML UI: DC Download progress indicator
For now just do an indeterminate busy indicator - we can get more fancy
and use the libdivecomputer progress event, later.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-25 15:52:07 -07:00
Jan Mulder
03badea06f QML UI: make toast message translatable
Restyle construction of toast message and enable translation for it.
Further, removed newline characters as they break the lines at
non-logical positions.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-06-25 13:56:04 +09:00
Dirk Hohndel
d93280f1dc QML UI: DiveList: add date box to trip header
This way you can tell when a trip happened.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-24 13:13:04 -07:00
Dirk Hohndel
49a368539a QML UI: set opacity of 1 for dive list
Hopefully with this we get exactly the right colors.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-24 11:19:56 -07:00
Dirk Hohndel
e3cd6719c1 QML UI: Davide's colors for the blue theme
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-24 11:18:18 -07:00
Dirk Hohndel
94bc756391 QML UI: Theme colors: fix bad typo
Here I confused myself with "dark" theme and the "darkerPrimary"
colorls...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-23 21:36:59 -07:00
Dirk Hohndel
206df227f8 QML UI: remember the theme
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-23 19:49:57 -07:00
Dirk Hohndel
26b206af1f QML UI: show a small color palette preview
When picking which color theme to use, show the user how things will look.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-23 19:49:57 -07:00
Dirk Hohndel
8ba581a088 QML UI: use textColor instead of diveListTextColor
This color is used for more than just the dive list.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-23 19:49:57 -07:00
Dirk Hohndel
694e833f90 QML UI: move theme setting into preferences
And reorganize settings and preferences a bit.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-23 18:48:41 -07:00
Dirk Hohndel
dac9ce578b QML UI: clean up the setting of theme colors
Let's have names for the colors in each theme and assign those
named values to the theme colors when switching themes. This
way other pages can access the colors that are not in the current
theme (for example for a theme switcher).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-23 18:48:41 -07:00
Dirk Hohndel
3f055ac9cb QML UI: set color of the action button
This requires Kirigami master past 2.2.0 (which explains commit 001ff1b9
"QML UI: switch to Kirigami master").

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-23 08:44:55 -07:00
Dirk Hohndel
57e365222b QML UI: color the status bar on Android
This code is based on code from Marco Martin from the Kirigami Android
sample app. In order to simplify the QML code the QMLManager function is
there for all OSs, but it's a no-op on anything but Android.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-23 08:42:45 -07:00
Dirk Hohndel
b1f7e3eae2 QML UI: add missing go-up icon
Now the 'Reachability' feature should be more obvious.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-22 09:05:43 -07:00
Dirk Hohndel
ea218b9d24 QML UI: DiveList: allow trip header to wrap
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-22 04:19:23 -07:00
Rick Walsh
d9cb65cbed QML UI: turn off spinner if pull-down-to-refresh fails
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-22 04:19:23 -07:00
Dirk Hohndel
28490d5dd0 QML UI: DiveDetails: add more space at bottom
This way the user can scroll up the page to see all of the notes without
having them covered by the action button.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21 18:33:27 -07:00
Dirk Hohndel
a7fca80a3e QML UI: don't access dive without modelData
Occasionally I see errors in the log where we would access modelData.dive
with modelData = null. This patch addresses a couple of the spaces where
this happens, but also simplifies the code by using the existing alias.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21 17:20:07 -07:00
Dirk Hohndel
7b7294d127 QML UI: DiveList: implement pull down to refresh
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21 17:20:07 -07:00
Dirk Hohndel
e0f46b033d QML UI: attempt to add dark theme
This isn't great, yet, but a first step to show that this is possible
(and in doing so I found quite a few spots where the colors weren't
correctly propagating, yet).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21 17:20:07 -07:00
Dirk Hohndel
8f2fc84ae7 QML UI: simple attempt to allow color scheme switching
By making the assignments to the Kirigami Theme colors Qt bindings
things get correctly updated when switching.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21 14:01:30 -07:00
Dirk Hohndel
71d9aafcd6 QML UI: Linus requested Hot Pink as color scheme
He started the project, he gets to have his color preference.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21 13:34:15 -07:00
Dirk Hohndel
4651454557 QML UI: don't reduce opacity for background of selected dive
Now that we have distinct colors for trip header and selected dive, this
is actually counter productive.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21 11:53:19 -07:00
Dirk Hohndel
02d8c98c93 QML UI: DiveList: always show current trip at the top
This is especially nice for very long dive trips.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21 11:48:29 -07:00
Dirk Hohndel
9ddd26ff37 QML UI: redo all the colors
Naming them the same way Davide named them in his emails and assigning the
color values he proposed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21 11:05:36 -07:00