aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets
AgeCommit message (Collapse)Author
2017-04-14QML UI: correctly render dive list when showing delete buttonGravatar Dirk Hohndel
This fixes the visual artifact that Willem reported. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-14QML UI: keep the fontMetricGravatar Dirk Hohndel
We reference it elsewhere. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-14QML UI: don't shrink fonts on narrow displaysGravatar Dirk Hohndel
Now that wrapping should work correctly, this isn't necessary any more. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-14QML UI: make run with Qt 5.7 againGravatar Dirk Hohndel
onPressed needs to be relative to Keys in Qt 5.7. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-14QML-UI: remove references to download from divecomputerGravatar Dirk Hohndel
This needs to be reimplemented. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-13QML UI: add 2cm x 2cm square to theme test pageGravatar Dirk Hohndel
This should make it easier to spot displays that are completely out of whack in their scaling. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-13QML UI: only assign actions in a declarative wayGravatar Marco Martin
Assigning actions in an imperative way on component complete, seems to cause a crash on some devices, assign declaratively the whole list instead, hiding the gps related actions on iOS as they are not supported on that platform. Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-11QML UI: re-layout the details viewGravatar Dirk Hohndel
This is a different take that seems to deal much better with different width and font size combinations. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-10QML UI: correctly set grid column widthsGravatar Dirk Hohndel
Spending more time reading the documentation, we need to set the Layout.maximumWidth, not the width. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-04QML UI: fix saving fields using HintsTextEditGravatar Marco Martin
The editText property is not there anymore, we need text Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-04QML UI: dialog of HintsTextEdit on topGravatar Marco Martin
Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-04QML UI: better handling of device pixel ratioGravatar Dirk Hohndel
In order to make sure we don't render the initial profiles with the wrong scale on devices, we need to seed the device pixel ratio with the device default and then update it once the window has been created. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-04QML UI: more hacks for the magicShiftFactor hackGravatar Dirk Hohndel
Since the device pixel ratio can be a fraction we should interpolate the values. I still don't really understand why this is necessary, so this is a hack on top of a hack - but for most values I tried this does seem to give us a reasonably well placed (and well scaled) profile. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-03QML UI: ensure actions are set up for Credentials pageGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-03QML UI: use a scrollable page for StartPageGravatar Marco Martin
Fixes scrolling of the cloud credentials and simplifies code Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-01QML UI: replace combobox with custom text field with hintsGravatar Marco Martin
Signed-off-by: Marco Martin <notmart@gmail.com>
2017-04-01QML UI: Fully port dive edit to Kirigami2Gravatar Marco Martin
Completely adapt to the api changes of OverlaySheet in Kirigami2 in order to achieve the same look and behavior for the dive edits that had with kirigami1 Port most components to QtQuickContrls2, except comboboxes in the dive edit sheet that will need a new control type Signed-off-by: Marco Martin <notmart@gmail.com>
2017-03-26MOBILE: Display pO2 and Setpoint for CCR divesGravatar Joakim Bygdell
For CCR dives we want to display the setpoint and pO2 information, due to the limited screensize we have to remove the temperature graph or the view will be to cluttered. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-03-24Subsurface-mobile: do send decimal GPS to GoogleGravatar Jan Mulder
Sending nicely readable formatted coordinates to Google Maps does not result in a correctly positioned map. Google likes unreadable decimal format. Little hacky solution. Added a gps_decimal attribute, populate that with the standard function for format a coordinate to string, but reset the preferences value temporarly so that it always converts it to decimal style. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-03-24mobile: the infamous enumerate problemGravatar Jan Mulder
This fix seems to fix the enumerate problem: the problem that on a seemingly non-determinstic way, all the profiles get enumerated and rendered, causing freeze of the app, or even crash due to out of memory. Only 3 lines of code change, but this fix did not come easy. The enumerate problem seems some kind of race condition between QML, Kiragami and most definitely, the Subsurface QML code itself. The breakthrough in my debugging was the setting of highlightRangeMode: ListView.StrictlyEnforceRange based on the QML documentation on snapMode: enumeration. This fix deserves proper testing in multiple environments. As could be seen on the developpers mailing list, I was (easily) able to reproduce the enumerate problem, but Rick was not. So I definitely do not claim to understand why this fix solves the issue for me. And as a sidenote: fixes #263 for me as well. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-03-18QML UI: enable caching of the details viewGravatar Dirk Hohndel
This way the dive on either side should be cached. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-18QML UI: don't explicitly position viewGravatar Dirk Hohndel
Instead have the view follow the currentItem. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-18QML UI: make profile drawing less verboseGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-18QML UI: don't unset the currentIndex in the dive listGravatar Dirk Hohndel
It's unclear why this code was added in the first place - removing it makes the highlight of the selected dive in the dive list work. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-18QML UI: don't clipGravatar Dirk Hohndel
At least that's what the QML documentation recommends. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-18QML UI: small cleanupsGravatar Dirk Hohndel
Remove unused signal handler. Small whitespace cleanup. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-18QML UI: don't access members of undefined objectsGravatar Dirk Hohndel
If we don't have a currentItem, don't try to access its members. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-18QML UI: small clarificationGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-11Sync unit system to Subsurface-mobile (part 2)Gravatar Dirk Hohndel
Missed a spot. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-11Correctly sync unit system to Subsurface-mobileGravatar Dirk Hohndel
We were doing the right thing switching from metric to imperial, but in order to swtich back you had to restart. Now it works both ways. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-08Change calls to rint into lrint avoiding conversion warningsGravatar Jeremie Guichard
Using gcc option "-Wfloat-conversion" is useful to catch potential conversion errors (where lrint should be used). rint returns double and still raises the same warning, this is why this change updates all rint calls to lrint. In few places, where input type is a float, corresponding lrinf is used. Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2017-03-04dive master > divemasterGravatar Martin Měřinský
2017-02-21Remove space before colon.Gravatar Martin Měřinský
2017-02-05Merge informational_prefs into git_prefsGravatar Joakim Bygdell
There is no need to have two variables for the same purpose. [Dirk Hohndel: changed to keep the two separate functions as otherwise we no longer parse existing repos successfully] Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-05MOBILE: Read profile settings from gitGravatar Joakim Bygdell
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-01-29QML UI: Parse multiple buddies when editing a diveGravatar jbygdell
This allows the user to enter multiple buddies as a comma separated list, the "Multiple Buddies" entry is still a special case as we can only populate the combobox with a single name for each entry. fixes #168 Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-01-22QML UI: allow magic phrase for multiple buddies to be localizedGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-22QML UI: correctly test if there are multiple buddiesGravatar Dirk Hohndel
The JS string function search returns the position of the string you search for and -1 if that string isn't found. Also, search allows regular expression, indexOf does just a string match. So let's use that as it is much faster. See issue #168 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-22QML UI: prevent modification of Multible Buddies textGravatar Dirk Hohndel
"Multiple Buddies" is magic in that it means "do not change the buddies set for this dive". Allowing the user to edit that magic phrase defeats the purpose. This deals with part of issue #168 - but of course that magic phrase shouldn't be fixed as English text. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-21QML UI: move 'No dives in dive list' downGravatar Dirk Hohndel
Otherwise it overlaps with the page title. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-21Revert "QML UI: build against latest Kirigami"Gravatar Dirk Hohndel
This reverts commit a842e44b685dbb7e34df317a8beacff747cee6bd.
2017-01-21Revert "QML UI: steps towards working with Kirigami 2"Gravatar Dirk Hohndel
This reverts commit 53ce3ce3e3cc38555bf7f2a1e7540638e5d294f8.
2017-01-01Update from 2016 to 2017. Happy new year!Gravatar Henrik Brautaset Aronsen
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-12-27Remove opacity callsGravatar Tomaz Canabrava
ApplicationWindow has no Opacity calls no more. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-12-27QML UI: steps towards working with Kirigami 2Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-12-27QML UI: build against latest KirigamiGravatar Dirk Hohndel
But of course this doesn't work, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-20QML UI: smaller fonts on narrow screensGravatar Dirk Hohndel
This may be excessive, but it fixes the issue with the German localization on some narrow screens. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-17QML UI: deal with multiple buddies correctlyGravatar Joakim Bygdell
When editing adive in Subsurface-mobile we can only handle one buddy due to the limitations of the combobox. To prevent loss of data when editing a dive with more than one buddy we display "Multiple Buddies" in the buddy field. This creates a special case where no changes are written to the buddy field unless the user changes buddy for that dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-17QML UI: two columns on 1024x768 iPadsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04Fix some warningsGravatar Dirk Hohndel
At least the warnings about size potentially being uninitialized seem correct and valid. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>