Commit graph

884 commits

Author SHA1 Message Date
Marco Martin
b3d0d9fd4e Don't put margins outside the internal ListView
put the margins only around the fullscreen delegate of the listview,
making the listview go all trough the screen edges.
This because the cutted effect when the list view is half scrolled
looks quite ugly. Making the ListView reach the borders
also moves the scroll indicator at the screen edge
where it conventionally is.

Signed-off-by: Marco Martin <notmart@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19 10:35:07 -07:00
Dirk Hohndel
660f421d6d QML UI: correctly show if we are accessing remote or local storage
This makes sure that if the user switches to offline mode they don't get
incorrect notifications that tell them that they are accessing cloud
storage.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19 10:34:49 -07:00
Dirk Hohndel
ac0c1eb5e1 QML UI: prevent changing pages while showing the edit/add overlay sheet
If you switch back to the dive list by swiping horizontally you stay in
edit/add mode and then can't select a dive on the dive list. This way you
have to discard or save the edit, first.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19 10:34:44 -07:00
Dirk Hohndel
1e86662e4a Remove QML files that are no longer used
The TextButton was what we used for actions very early on, and the TopBar
has now been replaced by the Kirigami header bar.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19 10:34:40 -07:00
Dirk Hohndel
a807a5e8cd QML UI: show dive site on map with left action on dive details page
The icon isn't great, though.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19 05:14:44 -07:00
Dirk Hohndel
c6dbbe1aac QML UI: adapt for latest Kirigami
In commit 50ebdd020e3c of the Kirigami project the syntax with which
actions are added to pages has changed. This commit tracks that, adds the
new file that was added in Kirigami and also removes the now obsolete
context menus (since we have a working back button on iOS now)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19 05:14:44 -07:00
Dirk Hohndel
628f83d5cf QML UI: only show GPS service / use current location if GPS accessible
If there is no GPS source or if permission to use it was denied, don't
offer to run the GPS service or to detect the current location when
adding or editing dives.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-17 22:59:19 -07:00
Dirk Hohndel
ecf44bb2fa QML UI: quit on back key while showing dive list
Make sure you save first, though.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-15 14:42:08 -07:00
Dirk Hohndel
c111c4bb02 QML UI: add elements to allow editing the GPS coordinates
This isn't hooked up, yet, but provides the UI

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-15 13:22:16 -07:00
Dirk Hohndel
9f9853fc44 Hack to work around issue in current Kirigami master
Commit 339411cca69b in Kirigami master tries to reparent the OverlaySheet
to the page that it is related to. Unfortunately the heuristic used there
to find the right object assumes that every page has a contentItem
property, which our DiveDetails page doesn't have.

As a hack to work around this issue (until this is fixed upstream in
Kirigami) we simply create such a property. This commit should be
reverted once Kirigami upstream has been fixed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-14 10:53:31 -07:00
Dirk Hohndel
6e6cce770b QML UI: keep QML manager and the UI in sync about selected dive
The manager can now directly update the index of the selected dive, and
the UI tells the manager the timestamp of the currently selected dive.
This allows the manager to pick the best possible dive as selected dive
if things change (for example if the dive list gets reloaded because it
changed in cloud storage).

Fixes #1009

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-14 09:43:33 -07:00
Robert Helling
7bca367c57 Upon undoing a dive deletion select that dive
Before it had the next dive still selected.

Fixes #1053

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-11 12:41:41 -07:00
Dirk Hohndel
4ed369b975 QML UI: only force network access when user asks us to
So when the user taps on the manual cloud sync, we always force access to
the cloud server. Otherwise we only access the cloud server if
git_local_only isn't set.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-08 12:37:17 -07:00
Dirk Hohndel
eefda2b090 QML UI: reformat the warning message when turning off auto sync
This is silly - it should be set up so it wraps by itself...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-08 12:29:52 -07:00
Dirk Hohndel
829369c18a QML UI: make readonly fields more obvious in dive edit
Remove the border and make them look more like labels. This adds a
StyledTextField for that purpose. And while we are at it, we can make that
StyledTextField a little prettier.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-08 11:14:10 -07:00
Dirk Hohndel
df2e7c052b QML UI: make gas mix validator case insensitive
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-07 22:57:02 -07:00
Dirk Hohndel
069cb8f6c5 remove reference to non-existing object
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-07 22:57:01 -07:00
Dirk Hohndel
1004ced285 avoid dereferencing undefined object
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-07 22:57:01 -07:00
Dirk Hohndel
12f0af19cb QML UI: remove redundant heading
This makes the start page look a bit more natural

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-07 22:57:01 -07:00
Dirk Hohndel
41ab12533b QML UI: more fixes to correctly calculate page widths
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-07 22:57:01 -07:00
Dirk Hohndel
0e49d6965c QML UI: fix page width calculation for dive details
Fixes #1049

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-07 11:22:44 -07:00
Dirk Hohndel
9f7e509f9a QML UI: break the sync into explicit save local and save cloud
This makes the code much cleaner and easier to understand and should allow
us to then switch back to doing at least the local save right after we make
any changes to the data.

This commit also tries to make sure that the accessingCloud status stays
correct and consistent throughout all the various success and error paths.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-06 11:47:12 -07:00
Dirk Hohndel
3bafc2a4e6 QML UI: close the drawer right when the user taps sync manually
Having a short delay before the menu closes looks bad.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-06 11:46:09 -07:00
Dirk Hohndel
6a23e0ef66 QML UI: save with unchanged credentials returns to dive list
If the user is on the credentials page, doesn't change the credentials
but simply taps on save, they now get back to the dive list.

Fixes #1047

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-06 11:42:38 -07:00
Dirk Hohndel
f21b36d9ba QML UI: hide keyboard before saving credentials
This way the user gets to see the git notifications.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-06 11:40:34 -07:00
Dirk Hohndel
6d1effe886 QML UI: more theme information
The fonts on my Nexus 6p are way too big (especially when compared
to the fonts of the same build on an iPhone 6plus that has very
similar screen size). Simply trying to get more data...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05 16:50:43 -07:00
Dirk Hohndel
8afdb665cd QML UI: dive list: smaller header above dives that aren't in a trip
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05 16:02:47 -07:00
Dirk Hohndel
7101cc8c02 QML UI: remove redundant dive log title
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05 15:54:01 -07:00
Dirk Hohndel
3c1d8ec291 remove code that is no longer used
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05 15:53:25 -07:00
Dirk Hohndel
5dab95b364 QML UI: use Kirigami default padding
The issue with needing extra space at the top of the page has been
fixed upstream.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05 15:49:31 -07:00
Dirk Hohndel
3472f20354 QML UI: dynamic page title for the root page
Subsurface-mobile is the name of the app, but not a good title for
the Dive list / Cloud credential page

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05 09:52:09 -07:00
Dirk Hohndel
77e83e8843 QML UI: keep the title bar larger on iOS
This is where the back button is located on iOS.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05 09:42:42 -07:00
Dirk Hohndel
710e2150c8 Add another Kirigami file and sort the private ones
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05 07:32:53 -07:00
Dirk Hohndel
7be962bfc2 Move subsurface-core to core and qt-mobile to mobile-widgets
Having subsurface-core as a directory name really messes with
autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an
autocomplete conflict and also was inconsistent with the desktop-widget
name for the directory containing the "other" UI.

And while cleaning up the resulting change in the path name for include
files, I decided to clean up those even more to make them consistent
overall.

This could have been handled in more commits, but since this requires a
make clean before the build, it seemed more sensible to do it all in one.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04 22:33:58 -07:00