summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml
AgeCommit message (Collapse)Author
2020-11-05mobile: add missing word to location warningGravatar Dirk Hohndel
Thanks to Johan, one of our Swedish translators for noticing this oversight. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-24mobile: show location service warningGravatar Dirk Hohndel
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-24mobile: show text with location service iconGravatar Dirk Hohndel
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-06Update translations from TransifexGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-08-16mobile/dive-edit: fix incorrect handling of multi tank gas mixesGravatar Dirk Hohndel
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-07-14mobile/download: don't allow download without connection setGravatar Dirk Hohndel
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-06-14mobile: show sync state in menu plateGravatar Dirk Hohndel
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-08mobile/dive-details: restrict width of tags fieldGravatar Dirk Hohndel
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-07mobile: add option to merge local cloud cache dataGravatar Dirk Hohndel
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-07mobile: tiny whitespace updateGravatar Dirk Hohndel
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-05-30mobile/dive-edit: fix broken editable combo boxesGravatar Dirk Hohndel
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-18mobile/dive-edit: use template components and theme colorsGravatar Dirk Hohndel
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-18mobile/UI: correctly theme template spin boxGravatar Dirk Hohndel
This was all hard coded and wrong. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-05-18mobile/dc-download: fix dark theme appearanceGravatar Dirk Hohndel
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-14mobile/dive-details: show tagsGravatar Dirk Hohndel
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-14mobile/dive-details: less whitespace at the topGravatar Dirk Hohndel
This always seemed odd - the location looked like it sat 'low' on the screen. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-05-14mobile/dive-details: use our labels to create denser displayGravatar Dirk Hohndel
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-14mobile: reduce vertical white space around labelsGravatar Dirk Hohndel
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-14mobile: add smaller, vertically dense template labelGravatar Dirk Hohndel
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-04-18mobile UI: indicate status of verbose flagGravatar Dirk Hohndel
This way the user can verify that they have set the log to verbose mode in the developer menu. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-13mobile: remove overwriting of line special case in ui-notificationGravatar Berthold Stoeger
On startup, we showed progress of the population of the fulltext and listmodels for every 100th dive. This worked by overwriting the last line if the new line started with '\r'. Since we don't do that anymore, we can remove this special case. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-04-04mobile/download-from-DC: ensure that changes get actually savedGravatar Dirk Hohndel
Calling saveChangesLocal() seems like the right thing to do, but it doesn't do anything useful if the dive list hasn't been marked as changed. The correct helper function to call is changesNeedSaving() which makes sure we save the changes and update all UI information. [Berthold: since this removes the last QML caller of saveChangesLocal() we can make that function private.] Signed-off-by: Dirk Hohndel <dirk@hohndel.org> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-04-04mobile/cleanup: fix whitespace and remove verbose messagesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-04mobile UI: delay reading the dive list until app is activeGravatar Dirk Hohndel
This way the launch screen is shown significantly shorter on a device, and instead the user sees our progress notifications. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-04mobile UI: only test for plugged in USB serial device on AndroidGravatar Dirk Hohndel
This test makes no sense on other platforms (and the log file text is frankly confusing when not running on Android). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-04mobile/dive-list: don't use cacheBufferGravatar Dirk Hohndel
QML documentation recommends against using the cacheBuffer for longer lists and doing more testing shows that this really doesn't help at all. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-04mobile/dive-list: performance improvement for invalid divesGravatar Dirk Hohndel
Small optimization that reduces the number of accesses to the underlying model. Instead of evaluating the isInvalid member eight times per delegate, we only check it once. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-04mobile/dive-list: only show dive list notifications when it is visibleGravatar Dirk Hohndel
Without this check we'll show the 'Please tap the plus botton...' notification during app initialization as we are showing the initial set of messages - which makes no sense. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-04mobile/startup: show notification directly in the UI windowGravatar Dirk Hohndel
Until the app is initialized, we have problems getting the 'floating' passive notifications to show up and be useful. Instead update the user by filling a text block on the otherwise empty initial page of the app. Delay the switch to the dive list until the app is initialized and then use the passive notifications again. While we are initializing also show a busy spinner so the user doesn't think the app is hung. As a side effect of this change, the dive list isn't shown until our models are initialized. And strangely this causes every single possible delegate to be instantiated. We can prevent that by not setting the dive list model until after we are done setting up the model. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-04cleanup: update all copyright dates to 2020Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-31mobile/dive-list: try to force focus on filter text fieldGravatar Dirk Hohndel
This was triggered by a change in enabled, but what is really changing is the visible property. This should work better. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-31mobile/dive-summary: make the drop downs smallerGravatar Dirk Hohndel
Especially on smaller screens we had issues fitting this on the screen. And it looks fine on larger screens as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-31mobile/dive-details: add option to toggle the invalid flagGravatar Dirk Hohndel
Simply for consistency with the dive list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-31mobile/dive-details: fix incorrect call to create tripGravatar Dirk Hohndel
This was using the myData alias that exists in the dive list but not on the dive details. This might work (because the models both use the same underlying base model), but given that we are using the currentItem of this ListView, I'm guessing that this would just silently fail (maybe with a warning in the log). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-31mobile/dive-details: if menu is open, close that with back buttonGravatar Dirk Hohndel
A second tap on the back button will then end add/edit or close the dive details and get us back to the dive list. This fixes an issue where tapping on back with the context menu open would bring you back to the dive list with the context menu still open, and because then change the text in the context menu as those are designed differently. Reported-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-31mobile/dive-details: don't show virtual keyboard in dive view modeGravatar Dirk Hohndel
At least in 4.9.3.1258/3.0.1 I was able to reproduce a situation where I edit one dive, go back to the dive list, then tap on a different dive and then the keyboard pops up, obscuring a big chunk of the screen. This tries to make sure the keyboard isn't shown in dive view mode. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-31mobile: improve Android back key behaviorGravatar Dirk Hohndel
There are two places where we try to prevemt unintended app exits. Once, in the onBackRequested signal handler on the dive list. This was missing special handling for the situation where one of the drawers was open. The second place is the onClosing signal handler in main.qml. Naively I thought that this was enough to catch all cases where we were about to exit the app, but apparently an explicit manager.quit() is a bit too forceful and doesn't get to that signal handler. With this commit we check for open drawers in both places. Belts and suspenders, I guess. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-31mobile/dive-details: remove the redundant 'map it' buttonGravatar Dirk Hohndel
You can already get to the map by either clicking on the location text or on the left action button. This third way to get there reduces the available space for the location text, and can cause positioning issues with very long location texts creating three or more lines of text, which then overwrites the dateRow below. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-31mobile/dive-list: avoid using undefined value as booleanGravatar Dirk Hohndel
This gets rid of an annoying and noisy warning. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-30mobile UI: don't exit when using back button to close drawersGravatar Dirk Hohndel
An Android user might reasonably assume that they can use the back button to close the global or context drawers. So act accordingly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-30mobile/dive-list: add indicator that dive list is being processedGravatar Dirk Hohndel
This should deal with the rather confusing 'No dive in dive list' shown while loading and processing the dive list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-30mobile/dive-list: show/hide virtual keyboard as needed for filterGravatar Dirk Hohndel
This should happen automatically, but for some reason it doesn't. So let's try to force it manually. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-30mobile/dive-list: make sure filter input area is visibleGravatar Dirk Hohndel
Since apparently the header property of the ListView isn't reliably making sure that our filter input line is visible, let's move the filter header to be it's own visual element and manually manage the relationship between that and the ListView. The obvious idea was to anchor the ListView to the bottom of the filterHeader, but that didn't work in my tests. So instead we are using the topMargin to make sure that there is space to show the header. Because this re-indents the whole filterHeader, 'git show -w' gives a much better idea what this commit actually changes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-26mobile UI: add create trip to DiveDetails context menuGravatar Dirk Hohndel
Should have done that in the first place. That's what happens when you are rushing it... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-26mobile/dive-list: add ability to create tripGravatar Dirk Hohndel
This adds a context menu entry for top level dives that allows the user to create a trip for that dive. Unfortunately this creates a new string to translate right before a release... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-26mobile/cleanup: pageStack.pop() doesn't take a string argumentGravatar Dirk Hohndel
This happens to do the expected thing, anyway, but let's not keep this broken code around. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-26mobile UI: undo partial dive add when cancelingGravatar Dirk Hohndel
When we start adding a dive, we actually create a diveAdd undo command so we have a dive that the user can edit. Which means we need to undo this action if we cancel. Also, for a more consistent UI, we should pop the dive details page that we used to edit this dive and bring the user back to the dive list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-26mobile/page-selection: consistently use showPage to select a pageGravatar Dirk Hohndel
We still used pageStack.push() all over the place. Also, in showPage, disable the map hack if the user actively picks a different page. This should fix an issue where the user picked the map and then tried to add a dive to the dive list - and instead of the dive edit was shown the map again. Reported-by: Hartley Horwitz <hhrwtz@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-25mobile/profile: ensure profile opacity resets when zoomingGravatar Dirk Hohndel
It's possible for our code to think that the user wants to pan the profile before realizing that the user actually is making a pinch gesture. In that case the profile could get stuck in semi-transparent mode. This prevents that from happening by explicitly resetting the opacity to 1.0 when we start a pinch. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-25mobile/debug: simulate zooming through mouse wheel on desktopGravatar Dirk Hohndel
And allow touchpad gestures to be recognized as well. This has no negative impact on the mobile platforms, but makes it much easier to test profile scaling / panning on the desktop. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>