aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets
AgeCommit message (Collapse)Author
2020-12-21mobile/UI: stop using removed Kirigami interfaceGravatar Dirk Hohndel
hidePassiveNotification() is no longer supported. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-21mobile: remove non-functional codeGravatar Dirk Hohndel
This never ever worked to trigger a profile update. The code is nonsensical as we cannot access the QMLProfile in a model delegate this way from outside the delegate. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-21mobile/profile: directly set up the diveIdGravatar Dirk Hohndel
The weird 'Component.onCompleted' always felt like the wrong way to do this. Setting this directly from the model seems like the much cleaner solution. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: remove incorrect code in ComboBoxGravatar Dirk Hohndel
This actually created a recursive dependency - I didn't see any negative visual effect, but lots of annoying warnings. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: fix theming of combo boxes in dive editGravatar Dirk Hohndel
Again, not using our template combo box. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: make dive download combo boxes theme awareGravatar Dirk Hohndel
In reality I should make our TemplateComboBox capable of handling the modifications needed here without yet another reimplementation. Maybe I'll do that next. This at least makes things look right. A couple of odd whitespace changes snuck in at the end. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: make filter entry / dives shown theme awareGravatar Dirk Hohndel
Again, not using our text field / label (plus adding a subdued color for the placeholder text). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: cloud credentials follow our themingGravatar Dirk Hohndel
This was simply not using our labels / text fields, so it didn't pick up our colors automatically. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: make passive notification easier to readGravatar Dirk Hohndel
Once again I couldn't fix this without making changes to Kirigami. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: fix context drawer headerGravatar Dirk Hohndel
Once again I couldn't fix this without making changes to Kirigami. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: correctly theme combo boxesGravatar Dirk Hohndel
Again, the fact that you basically need to completely reimplement the ComboBox in order to change some colors is frustrating. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile UI: style check boxes and radio boxesGravatar Dirk Hohndel
This is needed for the Export page. And may I say for the record that it's rather surprising that in order to change the color of one of those elements one ends up having to completely re-implement them. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: fix dive summary for dark themeGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: use theme colors for startup text and location warningGravatar Dirk Hohndel
This now looks right for the dark theme. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: correctly color the action button icons for dive listGravatar Dirk Hohndel
This uses one of our fixes to Kirigami to allows us to set the correct overlay color for our icons. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: correctly color the action button icons for dive viewGravatar Dirk Hohndel
This uses one of our changes to Kirigami that allows us to set the correct overlay color for our icons. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: fix ActionButton icon coloringGravatar Dirk Hohndel
This seems like a reasonably serious bug in Kirigami. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: better dive list color for dark themeGravatar Dirk Hohndel
While the text name is 'light primary color' it really has to be a dark blueish color to fit with the theme. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: correctly theme the global and context drawersGravatar Dirk Hohndel
This requires more changes to Kirigami, but with this we get dark drawers (the menus that slide in from the side) in the dark theme. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: improve theming of title barGravatar Dirk Hohndel
We do theming very differently from what Kirigami intended. Mostly that's because our code predates theirs. But also because Kirigami wants and app to simply use an OS theme - whereas we want to be able to provide different looks, independent from the OS theme. Ideally we'd still use the existing methods to change the colors and sizes of Kirigami UI elements, but for now this hack helps improve readability of the title bar. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: ensure we show a line between divesGravatar Dirk Hohndel
In the dive list the rendering of the line ended up being subject to rounding errors. With this change we ensure that the thin line is always shown. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: shrink dive log date buttonGravatar Dirk Hohndel
This was too big relative to the page layout. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: remove the thick line between tripsGravatar Dirk Hohndel
This took up a lot of space and made the UI look stodgy. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-20mobile/UI: fine tune the action button renderingGravatar Dirk Hohndel
On some platforms the side buttons looked disjoint from the center button. This fixes that problem. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17core: remove DiveObjectHelperGravatar Berthold Stoeger
Since switching to the mobile-models and removing grantlee, DiveObjectHelper was demoted to a thin wrapper around string formatting functions. The last user was removed in a previous commit. It was never a good idea, given QML's strange memory-management. Let's remove it. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-17mobile: remove DiveObjectHelper codeGravatar Berthold Stoeger
When editing a dive, a DiveObjectHelper of the unmodified dive was created to compare the edited with the old values. Since the DiveObjectHelper is used here only as a pointless wrapper around the formatting functions, call these functions directly. However, note that the code is in principle wrong since the change to the mobile-models, which do not use the DiveObjectHelper. The real fix would be to reload the data from the model to prevent going out-of-sync with respect to the formatting routines! Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-17mobile: adapt resource namesGravatar Dirk Hohndel
With the new Kirigami the URI for the backwards and forwards arrows apparently changed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17kirigami: maintain our patches relative to upstreamGravatar Dirk Hohndel
Having them as commits like this should make it easier to migrate them as we update the underlying Kirigami version. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile: fix implementation of menu back featureGravatar Dirk Hohndel
With the updates to Kirigami I slightly modified the hack that we use to implement that, as a result we call pop() directly on the globalDrawer. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile: re-add breeze iconsGravatar Dirk Hohndel
This time from the cloned repo. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile: avoid warning in QML codeGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile: don't use reserved wordGravatar Dirk Hohndel
This used to work, but with current QML/Kirigami it throws an error. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile: silly whitespace cleanupGravatar Dirk Hohndel
Simply because it bugged me. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile/kirigami: first steps to switching to Kirigami 5.76Gravatar Dirk Hohndel
Our half-assed manual build of Kirigami was becoming completely unmaintainable. So let's try to use the build method that the Kirigami team recommends. Which unfortunately requires us to have access to the KDE extra cmake modules (ECM). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-13core: keep tank infos in a dynamic tableGravatar Berthold Stoeger
The list of known tank types were kept in a fixed size table. Instead, use a dynamic table with our horrendous table macros. This is more flexible and sensible. While doing this, clean up the TankInfoModel, which was leaking memory. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-11-14desktop: automatically reload completion-modelsGravatar Berthold Stoeger
Instead of programatically reload the completion models, listen to the relevant signals in the models. To that goal, derive all the models from a base class. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
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-26cleanup: remove struct/class confusionGravatar Dirk Hohndel
DiveSiteChange is defined as a struct, not as a class. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-25cleanup: move application flags to core/subsurfacehelper.hGravatar Berthold Stoeger
These flags are not dive-related, therefore move their declaration to the appropriate header file. Likewise, move their definition from parse-xml.c to subsurfacehelper.c Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-10-25cleanup: move mark_divelist_changed() to qmlmanager.cppGravatar Berthold Stoeger
Desktop does not use mark_divelist_changed() anymore - all is done via the undo machinery. Therefore move this function (and its counterpart unsaved_changes()) to qmlmanager.cpp. Ultimately, it probably should be removed from there as well, but currently I don't dare to touch all the cloud-logic! Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-10-24git: add device-table to git-parser-stateGravatar Berthold Stoeger
In analogy to the xml-parser add a device-table to git's parser-state. Currently this is unused. In upcoming commits the git parser will then be changed to add device nodes in this table instead of the global device table. The long-term goal being to detach the parsers from global state and to make dive-import fully undoable. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-10-24devices: add devices in Command::importTable()Gravatar Berthold Stoeger
Add a device_table parameters to Command::importTable() and add_imported_dives(). The content of this table will be added to the global device list (respectively removed on undo). This is currently a no-op, as the parser doesn't yet fill out the device table, but adds devices directly to the global device table. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-10-24devices: add functions to add / remove / check for devicesGravatar Berthold Stoeger
To include the device code in the undo system, we need functions to check for the existence of devices and to add or remove them. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-10-24parser: add device_table to parser stateGravatar Berthold Stoeger
If we want to avoid the parsers to directly modify global data, we have to provide a device_table to parse into. This adds such a state and the corresponding function parameters. However, for now this is unused. Adding new parameters is very painful and this commit shows that we urgently need a "struct divelog" collecting all those tables! Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
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-17filter: remove filter_preset_table_tGravatar Berthold Stoeger
We used a typedef "filter_preset_table_t" for the filter preset table, because it is a "std::vector<filter_preset>". However, that is in contrast to all the other global tables (dives, trips, sites) that we have. Therefore, turn this into a standard struct, which simply inherits from "std::vector<filter_preset>". Note that while inheriting from std::vector<> is generally not recommended, it is not a problem here, because we don't modify it in any shape or form. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-10-06Update translations from TransifexGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-29filter: implement loading of filter presets from git repositoriesGravatar Berthold Stoeger
This is mostly copy and paste of other git loading code. Sadly, it adds a lot of state to the parser-state. I wish we could pass different parser states to the parser_* functions. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-09-29filter: load filter presets from XML filesGravatar Berthold Stoeger
This is a bit painful: since we don't want to modify the filter presets when the user imports (as opposed to opens) a log, we have to provide a table where the parser stores the presets. Calling the parser is getting quite unwieldy, since many tables are passed. We probably should introduce a structure representing a full log-book at one point, which collects all the things that are saved to the log. Apart from that, this is simply the counterpart to saving to XML. The interpretation of the string data is performed by core functions, not the parser itself to avoid code duplication with the git parser. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>