aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile/qml/DiveDetailsView.qml
AgeCommit message (Collapse)Author
2016-02-08QML UI: DiveDetailsView - calculate better width and set everywhereGravatar Dirk Hohndel
Even setting things up in the first row isn't enough. Every field in the grid needs an explicit width. How dumb is that. To make this more manageable calculate the correct widths at the beginning and then just reference those properties. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-08QML UI: DiveDetailsView - set fixed column widthsGravatar Dirk Hohndel
In order for wrapping to work, the Text and TextEdit elements need to have a defined width. Normally the GridLayout is supposed to be able to figure out optimal widths for the different colums if you tell it which ones should stretch, but that has repeatedly caused infinite loops and crashes in the layout engine. For now, in order to get both wrapping (and therefore no clipping of the content) and avoid crashes, we hard code the width of the four columns by setting Layout.maxWidth for each element in the first row of the grid. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-08QML UI: DiveDetailsView - reorder the gridGravatar Dirk Hohndel
Let's put the three likely rather narrow items above each other in the right column and the others (especially the three that could run long: suit, buddy, dive master) in the left one. Also, make the individual entries more consistent in which attributes are set in which order - easier to read. Finally, make sure that all grid elements enable wrapping. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-07QML UI: another attempt to fix the random crashesGravatar Dirk Hohndel
I finally was able to reproduce the crashes with the infinite recursion when computing a GridLayout. This seems to be triggered by competing Layout.fillWidth settings that the layout engine couldn't figure out how to accomodate. I did three things to make this work better: - explicitly grab the columnWidth for the width of the DiveDetailsView. - split the GridLayout in two so the area above and below the profile are no longer forced to fit in the same column widths. - remove most of the Layout.fillWidth settings and only leave a couple that seem sufficient to get reasonable on screen layout in my experiments. Here's hoping that this one is finally resolved. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-01QML UI: Another attempt to shift dive number to top rowGravatar Rick Walsh
Commit 1030cb265a46436a1903cdf66d88a7dd3351d3aa 'QML UI DiveDetailsView: shift dive number to right of top row' was reverted because it caused mysterious crashes for some testers, inferred to be related to sizing items in a gridLayout. This patch brings the dive number back up to the right of the top row, so the page width doesn't exceed the screen width. Using text wrapping should prevent the date text and dive number items from increasing in width, and hopefully avoids the mysterious crashes. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-31Revert "QML UI DiveDetailsView: shift dive number to right of top row"Gravatar Dirk Hohndel
This reverts commit 1030cb265a46436a1903cdf66d88a7dd3351d3aa. Simply trying to find out if this is the cause for the odd crashes one tester is seeing.
2016-01-27Move helper function to DiveObjectsHelperGravatar Joakim Bygdell
As per Tomaz recomendation the helper functions from 19588ce and e072596 are moved from qmlmanager to DiveObjectsHelper. [Dirk Hohndel: merged with the latest code] Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-27QML UI: revert dive detail view layout changesGravatar Dirk Hohndel
Now the layout flows again and shouldn't cause clipping on the right (unless the user has excessively long, unbreakable words it seems. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25QML UI: Add helper function to get weightsGravatar Joakim Bygdell
Helper function that retrieved the total weight for a dive to be displayed on the DiveDetials page. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25QML UI: Add helper function to get cylinder infoGravatar Joakim Bygdell
Helper function that retrieves the cylinder description to be displayed in the DiveDetails. Only the first cylinder for a dive is retrieved. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25QML-UI: Rearrange the DiveDetails pageGravatar Joakim Bygdell
After adding "Cylinder" to the DiveDetails page the objects had to be rearranged in order to better utilise the space. To get a cleaner look on smaller screens the left side is left aligned and the right side is right aligend. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-21QML UI: fix map display regressionGravatar Dirk Hohndel
In commit 6540e95425eb ("dive details navigation") the change to access the gps variable was only partially implemented. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-20QML UI: show date and time for diveGravatar Dirk Hohndel
We keep losing the time when people move code around. date really is just the date and doesn't include the time component. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-19QML UI DiveDetailsView: shift dive number to right of top rowGravatar Rick Walsh
In dive details view, shifting the dive number to the right of the top row means it won't be cut short if the dive duration is 1 hr or longer Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-13try to fix profile scalingGravatar Sebastian Kügler
Different approach here: - profile gets a bit higher, this was requested on the mailinglist, and seems to behave much better with the painted profile, we'd otherwise get it magically clipped on the right hand side. - Make the scaling dpi aware, this fixes scaling for me on the Nexus7, I haven't been able to test it properly on other devices, so this needs some more testing. The result is visually quite close to what we can do, although I'm still getting a somewhat larger margin on the right. To get at the devicePixelRatio without too much custom code, I've added a property to the QMLProfile to retrieve it from the theme engine. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-12dive details navigationGravatar Sebastian Kügler
This patch reworks the navigation of the dive details. - The detailsview is now a list view with page-sized delegates. This allows horizontal swiping to the next and previous dive. - The central button now allows to open the edit mode for the dive. Original patch was done by Marco Martin, but needed to be reapplied by hand. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-29QML UI: obtain a reasonable margin from QMLGravatar Dirk Hohndel
This will be used later in the positioning of the profile. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26QML UI: mark locations with GPS dataGravatar Dirk Hohndel
In the dive detail view, if a location has an associated GPS location, show the name of the location underlined so the user knows that tapping on it will open a browser window with a map picture. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26QML-UI: add hacky, useless way to show the GPS location of a diveGravatar Dirk Hohndel
This is of course stupid and NOT what we want to do, but one could argue it's better than nothing (well, not sure, whatever). If we have a GPS location associated with a dive and you tap on the location name when showing the dive details, it opens a static image of a satellite map with a marker for the dive site. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-07QML-UI: add dive date to the detail viewGravatar Dirk Hohndel
That one really bugged me... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-07Fix text clippingGravatar Sebastian Kügler
2015-12-07redesign dive details viewGravatar Sebastian Kügler
This change cleans up the layout optimized for viewing dive details. The top part contains brief and essential dive info (location, depth, duration, dive no.), then the profile, then a table with more details, and finally the notes. The goal here is to present the dive's data more efficiently and attractively now that the edit part is factored out. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07split divedetails into view and edit partsGravatar Sebastian Kügler
This splits the dive detail page into two modes: view and edit - The edit part loses the profile (it's not editable anyway) - The view part gets a new layout, friendlier for viewing - Properties for diveNumber, duration, depth and weight are added Signed-off-by: Sebastian Kügler <sebas@kde.org>