aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets
AgeCommit message (Collapse)Author
2020-02-25mobile/profile: make the wait before dragging even shorterGravatar Dirk Hohndel
Several users still found the wait too long - this is near instantaneous it just ignores brief taps. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-18mobile/export: fix styling of radio buttonsGravatar Dirk Hohndel
Use the TemplateRadioButton to get the default styling - and by switching to the RadioButton from Controls.2 we also get exclusivity by default. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-18mobile/profile: enable zoom and pan for the QML profileGravatar Dirk Hohndel
When running mobile on desktop there are some odd jumps in the mouse position while in drag mode (press and hold, then move). They make the user interface seem jerky. But I haven't observed the same behavior on the mobile device when testing. So I'm not sure what to do with that. Using opacity to indicate that the user is able to pan the profile seems reasonably obvious; not sure if it's the best possible way to do this. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-18mobile/profile: add invisible rectangle around QMLProfileGravatar Dirk Hohndel
This way we can clip the profile to it's designated size. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-18mobile/developer: add menu entry to temporarily enable verbose modeGravatar Dirk Hohndel
One could argue that this should be a preference. I like the fact that it isn't persistent, though. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-17mobile/export: fix horrendous user interfaceGravatar Dirk Hohndel
This should never have been merged as it was. The UI was atrocious and the functionality was by and large untested. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-17mobile/resources: fix incorrectly coded XSLT stylesheetsGravatar Dirk Hohndel
The prefix meant that on device these weren't found. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-17mobile/export: don't allow file based exports on AndroidGravatar Dirk Hohndel
There is no native file dialog, access to the file system is highly restricted and will be much more so in Android 11. Let's not even start with this. This should never have been merged as it was. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-17mobile/export: remove most of the export optionsGravatar Dirk Hohndel
A tablet or phone is not a computer. What would you do with a CSV or TeX/LaTeX file on a phone. Yeah, I get it, feature parity. This should never have been merged. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-17mobile/export: clean up whitespaceGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-13mobile UI: restructure menuGravatar Dirk Hohndel
This changes the 'GPS' entry to be called 'Location', moves the 'Map' entry below that, and reuses the map icon for both the map inside this submenu and for the main menu item. It moves the 'About' entry under 'Help' and both 'Export' and 'Dive summary' under 'Dive management'. This way we have only five (or with 'Developer' enabled, six) entries in the main menu making it much more appropriate for really tiny screens. Additionally, the entrieis moved into sub-menus are ones that are not all that commonly used. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-10mobile/summary: remove some debug outputGravatar Dirk Hohndel
I don't think we need that anymore. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-10mobile/summary: expand refresh buttonGravatar Dirk Hohndel
Buttons ignore the width of the enclosed label and base their width on the illogically named implicitWidth instead. Also translate the button text. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-10mobile/summary: more UI fine tuningGravatar Dirk Hohndel
Creating more space for the header column and a little visual separation for the different sections. The commit is much smaller than it looks - try 'git show -w'. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-09mobile UI: fix font size breakage on AndroidGravatar Dirk Hohndel
The pointSize() of a font can return -1 if the font was originally specificied with a pixelSize. Work around this by using QFontInfo to calculate the correct value. Additionally, don't use the pointSize() of a font when we can instead use the calculated size. This fixes the problem with the missing star ratings on Android. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-09mobile UI: fix alignment issue in dive details viewGravatar Dirk Hohndel
The 'Map it' button could overlap with the dive number below, depending on font size. This fixes the issue. Reported-by: Peter Reinold <mcc.nash@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-09Correcting typos of the word celsiusGravatar Jason Bramwell
Corrected typo of the word celsius in three files: core/import-csv.c core/divefileter.h mobile-widgets/qml/Settings.qml These were spelled as celcius but corrected these to celsius. The 'core files were just comments but the mobile-widgets file would be 'active' code. Reported by: tormento <turment@gmail.com> Signed-off-by: Jason Bramwell <jb2cool@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-09Cleanup: remove exportFunc classGravatar Berthold Stoeger
exportFunc was a collections of functions for exporting dive data. It had no state, therefore there is no reason for it to ever be instantiated. Simply remove the class. Rename the saveProfile function to exportProfile so that all export functions start with "export". Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-08mobile UI: correctly determine the number of columns when screen size changesGravatar Dirk Hohndel
This also deals with a bug we had before where we didn't re-start the calculation for the various sizes from the assumption of 'at least 21 grid units'. Now you can rotate the device and the right thing will happen. Small warning - this checks the orientation of the screen, which is exactly what you want it to do on your device. When running mobile on desktop this may not be what you expect. Even if the window has a portrait aspect ratio, your screen is likely still landscape... so testing this feature in mobile on desktop mode is a bit harder... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-08mobile/settings: add UI for single column preferenceGravatar Dirk Hohndel
This is placed in the Advanced section as I expect this to be rather unusual for people to enable. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-08mobile/summary: use more intuitive time periodsGravatar Dirk Hohndel
No one will ask you about your dives in the last seven months (and the existing code actually provided the past 210 days in that case). Instead do more intuitive periods. Last month, quarter, half year, year. Use Qt's ability to make sane date calculations easy. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-08mobile/summary: improve the spacing of the contentGravatar Dirk Hohndel
Use more idiomatic ways to indent the rows, replace the TemplateLabel with a simple Label since drawing the extra rectangle for the background of the TemplateLabel is obviously redundant and using it doesn't change the number of properties we need to set. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-08mobile/summary: correctly align text to vertical centerGravatar Dirk Hohndel
I keep forgetting that the verticalAlignment is only within the current object, which means that in a single line label it has no meaning at all. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-08mobile/summary: add refresh buttonGravatar Berthold Stoeger
On tablet devices, the summary page stays open and therefore the summary is not refreshed. For now, add a button. Later, this should be connected to signals when dives are edited, added or deleted. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-08mobile/summary: add section headersGravatar Berthold Stoeger
Add section headers to the dive summaries on mobile by adding a section-property. Of course, this will not work on desktop. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-08mobile/summary: remove dive summary calculationGravatar Berthold Stoeger
Since we now use a model to calculate the dive summary, there is no need to export recalculation of the dive summary via QMLInterface. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-08mobile/summary: implement frontend code for the new summary modelGravatar Dirk Hohndel
Implements the ListView and its delegate to use the dynamic data provided by the DiveSummaryModel Signed-off-by: Dirk Hohndel <dirk@hohndel.org> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-08mobile/summary: recalculate first and last dive on visibility changeGravatar Berthold Stoeger
Recalcluate not only the statistics for the given period, but also the global first and last dive date. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-08mobile/summary: implement firstDiveDate and lastDiveDateGravatar Berthold Stoeger
Instead of transporting the global first and last dive date in the dive summary, calculate it in an external function. Since we already have time and date functions in qthelper.cpp implement those functions there. Provide a stub in QMLInterface so that QML can access these standalone functions. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-08mobile: prevent crash adding divesGravatar Dirk Hohndel
When the cylinders became a dynamic data structure, a get_cylinder() call suddenly could return a NULL pointer. So use get_or_create_cylinder() for the first call when parsing the user's data. Also, deal with an oddity where the string lists look different because an empty list technically isn't the same as a list with one empty string. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-07mobile/notes-edit: ensure cursor stays visible editing dive notesGravatar Dirk Hohndel
This seems to work much more reliably as it specifically compares the cursor position to the visible bottom and top of the screen. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-06mobile/settings: fix the width of cylinder drop downGravatar Dirk Hohndel
The GridLayout isn't part of a Layout, so set its width and have the combo box fill it's part of the grid. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-06mobile UI: set correct width for TeplatePageGravatar Dirk Hohndel
A page by default fits in a column. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-06random white space fixGravatar Dirk Hohndel
QtCreator fixes that for me after every edit, I'm getting tired of manually removing those hunks. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-06mobile UI: redo the screen size magicGravatar Dirk Hohndel
This still is way to fragile. Ordering of object completion doesn't appear consistent. Hopefully bringing the properties all into one (now reasonably named) object will help. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-06mobile: comment out planner referencesGravatar Dirk Hohndel
I don't expect this to be complieted. I'll keep it in the tree for the moment, but expect to remove all of the related code eventually. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-06mobile/settings: correctly draw the size buttonsGravatar Dirk Hohndel
With the columnSpan 3 (in a grid with only two columns) they were drawn on top of the drop down for the theme. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-06mobile/settings: refer to the correct theme objectGravatar Dirk Hohndel
This was missed when switching object names. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-06mobile/settings: white space cleanupGravatar Dirk Hohndel
Some odd empty lines and an unnecessary line break. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-06mobile/settings: make the color swatches work as color swatchesGravatar Dirk Hohndel
In a color swatch the color of the body of the swatch is the one that matters. And we need to ensure readability. So for each pair of colors, use the combination in the regular order (color/textcolor) for the background swatch, and inverted for the text swatch. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-06mobile/settings: correctly set label backgroundGravatar Dirk Hohndel
The TemplateLabel comes with a set background color which creates a very odd effect and makes the text generally unreadable in the color swatches. Fix this by matching the color of the parent rectangle. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-06mobile/settings: remove confusing frame around column titlesGravatar Dirk Hohndel
These are not color swatches like the rest, these are the column titles, so don't draw them the same way as the color swatches. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-04Cleanup: remove capture-all lambda clausesGravatar Berthold Stoeger
These were forgotten the last time. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-03mobile-widgets: switch to new subsurfaceThemeGravatar jan Iversen
Remove subsurfaceTheme from main.qml Replace ThemeNew -> subsurfaceTheme change registration ThemeNew -> subsurfaceTheme Signed-off-by: jan Iversen <jan@casacondor.com>
2020-02-03mobile-widgets/qml: secure subsurfaceTheme.initial*Gravatar jan Iversen
move initialWidth/initialHeight out of subsurfaceTheme to placeHolder, this secures no change in behaviour. Signed-off-by: jan Iversen <jan@casacondor.com>
2020-02-03mobile-widgets/qml/settings.qml: show all colorsGravatar jan Iversen
Show all colors in a theme, allowing user to change theme. This is preparation for allowing users to click on the individual colors and change them. Signed-off-by: jan Iversen <jan@casacondor.com>
2020-02-03mobile-widgets/themeinterface: make most part staticGravatar jan Iversen
Make variables and functions static where possible, this is done to prevent different versions of theme with different values. Signed-off-by: jan Iversen <jan@casacondor.com>
2020-02-03mobile-widgets/qml: use new templates in converted pagesGravatar jan Iversen
Use the TemplatePage and TemplateButton in the converted pages. In order to avoid a bigger search/replace all other pages are left untouched (for now). Signed-off-by: jan Iversen <jan@casacondor.com>
2020-02-03mobile-widgets/qml: add TemplateButtonGravatar jan Iversen
Do "git mv SsrfButton TemplateButton", and search/replace all uses. The general idea of the templates are to secure common layout, but also to isolate the Kirigami parts (slowly) in the templates. Signed-off-by: Jan Iversen <jani@apache.org>
2020-02-03mobile-widgets/qml: add TemplatePageGravatar jan Iversen
Signed-off-by: Jan Iversen <jani@apache.org>