summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/DiveDetailsView.qml
AgeCommit message (Collapse)Author
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-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-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-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-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>
2020-03-23mobile/profile: don't pan unless we are zoomed inGravatar Dirk Hohndel
This way someone trying to swipe from dive to dive won't inadvertantly pan the profile instead. And panning it really only makes sense when zoomed in in the first place. This could leave us in a situation where we zoom in, pan, zoom out and now the profile is out of whack and we cannot correct it. A simple click on the profile fixes that. The real solution would be some constraining / adjusting as we zoom and pan to ensure we keep things correctly positioned. Maybe I'll figure out the correct way to do this later... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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/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-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-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>
2019-11-08Mobile: ensure there's some space between date and depth/durationGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-10-26Mobile: don't show nothing for the locationGravatar Dirk Hohndel
We use 'Dive details' as page title, everywhere else we use '<unnamed dive site>'. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-10-26Mobile: fix incorrect variable dereference for dive siteGravatar Dirk Hohndel
Since we are accessing the model, this is the variable we should use. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-10-20Mobile: get dive details directly from the modelGravatar Dirk Hohndel
By getting a DiveObjectHelper and then dereferencing that we ended up creating hundres and hundreds of these objects, only to immediately destroy them after using a tiny part of the data. Instead make those data available directly from the model, without having to create a DiveObjectHelper forst. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-10-06Fix text in darkmode on mobile app.Gravatar Paul Buxton
Signed-off-by: Paul Buxton <paulbuxton.mail@googlemail.com>
2019-09-27Mobile: Don't access dive-id via DiveObjectHelperGravatar Berthold Stoeger
There is already a role to do that. Query the model directly to avoid creating a full DiveHelperObject. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-29Dive site: replace UUID by pointer in mobile codeGravatar Berthold Stoeger
Replace UUIDs by pointers to dive-site in mobile code. In both cases, the value is transported via a QVariant. The function getCoordinatesForUUID(), which was only used from mobile, can be replaced by a getCoordinatesFor() function taking a variant supposed to contain a dive-site pointer. Likewise, the variant of the centerOnDiveSite function is now supposed to wrap a pointer-to-divesite. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-01Mobile QML UI: bump Kirigami imports to 2.4Gravatar Jan Mulder
Primarily for reasens of keeping up with upstream. And hopefully bugfixes and added functionality. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-08-11Mobile: display all used cylindersGravatar Jocke
Display all used cylinders as a comma separated list. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-06-18mobile: revert e993d4f005e62c12765e2e45342ecf840476e3bfGravatar jan Iversen
The commit secured that plotDive was not called before actually being used. However our (rather fragile) C++ qml interface did not work correctly (ony sometimes). Revert the previous commit. Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09mobile: do not call plotDive during startupGravatar jan Iversen
Check in profile if visible before calling plotDive Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09mobile: white space clean in DiveDetailsView.qmlGravatar jan Iversen
Signed-off-by: Jan Iversen <jani@apache.org>
2018-04-16QML UI: fix incorrect icon referencesGravatar Dirk Hohndel
Not sure why this has worked in the past - it was simply wrong. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-11main.qml: modify showMap() to not accept locationGravatar Lubomir I. Ivanov
showMap() uses a location to open Google Maps in a browser. Make showMap() a generic function to push the mapPage on the view stack. Update the calls to this function from child widgets and pages. Also either call mapPage.centerOnLocation() or mapPage.centerOnDiveSiteUUID() depending if the caller wants the map to center on a dive site or on map coordinates. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-19QML UI: QtQuick.Layouts to 1.2Gravatar Jan Mulder
And again, no visual changes. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-11-19QML UI: QtQuick.Controls to version 2.2Gravatar Jan Mulder
Tested fine without visual changes. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-11-19QML UI: QtQuick to 2.6Gravatar Jan Mulder
Upgrade QtQuick to 2.6. Seeing a small artifact in the application header, lets see what happens when upgrading more includes. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-11-19QML UI: Kirigami to 2.2Gravatar Jan Mulder
When first tested this commit, especially the dive list was looking terrible. However, after including newer SHA's from libkirigami, and correcting lots of spacing/margin issue, a retest of this commit shows no strange artifact any more, and the amount of warnings in the log output is reduced significantly. So now, it appears save to upgrade. Notice that main.qml still uses Kirigami 2.0. and is not updated in this commit. With version 2.2, there is a new way of theming, that is not (yet) compatible with our current code. Blindly upgrading to 2.2 leads to a almost black dive list, wrong button colors, and runtime errors in the log, due to the fact the direct setting from QML Kirigami's Theme colors is not allowed any more. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-19QML-UI: some more layout repair (dive details)Gravatar Jan Mulder
As in a525fff1125, also the dive details top data was not nicely positioned any more due to the deprecated and removed Kirigami.Label. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-17mobile: silence deprecated messages in logging about Kirigami.LabelGravatar Jan Mulder
Commit 8f6827ab122 brought a new SHA for Kirigami, but that introduces a very noisy logging of "Kirigami.Label is deprecated. Use QtQuickControls2.Label instead". So, thats what done here. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-08-02QML UI: display rating and visibility starsGravatar Joakim Bygdell
Display rating and visibility stars on the dive details page. See #495 Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-26QML UI: use primaryColor instead of darkerPrimaryColorGravatar Joakim Bygdell
In most places we wrongly used the darker primary color instead of the primary color. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-26QML UI: replcae the "map it" buttonGravatar Joakim Bygdell
Replace the "map it" button implementation with our own button. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-14QML UI: Hide map it text if no coordinates existsGravatar Joakim Bygdell
This hides the text for the map it button if ther are no coordinates for a dive. Needed as for the dark theme the map it text was still visible. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-09QML UI: Style Dive Details ViewGravatar Joakim Bygdell
Change the accent colors in the dive details view to match the theme colors. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-09QML UI: Proper button colorGravatar Joakim Bygdell
Make the "map it" button follow the theme color. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-06-23QML UI: use textColor instead of diveListTextColorGravatar Dirk Hohndel
This color is used for more than just the dive list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21QML UI: DiveDetails: add more space at bottomGravatar Dirk Hohndel
This way the user can scroll up the page to see all of the notes without having them covered by the action button. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21QML UI: redo all the colorsGravatar Dirk Hohndel
Naming them the same way Davide named them in his emails and assigning the color values he proposed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: DiveList: playing with different colorsGravatar Dirk Hohndel
Make the accent color much lighter, don't have a solid bar on the left for dives that are part of a trip. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: disable the MouseAreaGravatar Dirk Hohndel
Visible doesn't even make sense... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: DiveDetailsView add button for mapGravatar Dirk Hohndel
Implementing another suggestion from Davide. A button to get the map (as well as just tapping on the location name). Fixes #431 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: DiveDetailsView: make key dive info consistent with dive listGravatar Dirk Hohndel
Remove the grid layout and replace it with code that is derived from the delegate that we use in the dive list. In order to look proportional I ended up using a larger font for the location and therefore decided to allow that text to wrap instead of forcing single line. This implements a good chunk of another one of Davide's great suggestions. See #431 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: DiveDetailsView: make the lower section less busyGravatar Dirk Hohndel
This removes fairly redundant text (yes, we know those are the Dive Details) and makes the label for the Notes consistent with all the other labels. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: DiveDetailsView: move profile into bottom layoutGravatar Dirk Hohndel
Then we can remove the main layout and create a similar look as we now have in the dive list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20QML UI: DiveDetailsView: don't underline locationGravatar Dirk Hohndel
Davide points out that this is not a commonly understood way in an app to indicate that a text is also a link. So let's just remove that (but tapping on the location will still work to get you to the map if there is GPS information available). See #431 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>