This one appears to work in my testing so far. And reading the code it
seems to make sense. We look at the size that the widget thinks it is. And
we scale the scene to fill that size (including a margin). And then let Qt
and QML deal with the rest of it. Assuming this works it shows that we
have been trying too hard all this time.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In commit 37c10c8fd6 ("Add dive type to statistics window") not enough
space is reserved for the newly introduced array if the dive list as fewer
than 4 entries.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In commit f28f03afe2 ("build.sh: make it easier to build
Subsurface-mobile") I mistakenly broke the logic that decides to run the
mobilecomponents.sh script.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This adds dive type based division to the "yearly statistics" window.
Thus people can see the stats from individually from OC, CCR, PSCR and
freedive.
See #949
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This hides the start time when viewing trip details.
See #964
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The date comes from the first dive in trip, thus no need to allow
editing (especially since the edited date seems to be discarded in any
case).
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The script now takes a -mobile argument, or -both and then builds the
mobile version or both versions. To make things more consistent across
different invocations the desktop version is built in the "build"
directory and the mobile version is built in "build-mobile".
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Make the default build a DesktopExecutable, with an option to set a variable for doing a mobile build.
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We probably want to change that on the prefs struct too.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Rename a few methods wrongly named and place them on the correct place on the file.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
On the desktop we have long had this vision of a minimum length and a
"pleasant" duration of the profile - but on a device this seems to look
like uneven margins. So let's just add space for the labels and not
otherwise mess with the duration.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>
- Apparently, QMLProfile doesn't like being painted without being
visible, when flicking quickly through the dives I would get empty
rendered profiles. Setting the cachebuffer to zero fixes it, and saves
some memory.
It still has some unfortunate timing, the profile gets rendered
mid-flick, which leads to a delay in the flicking motion, quite
annoying. We will have to somehow make sure that new profiles are
rendered after flicking, not during
- Smallish cleanups
Signed-off-by: Sebastian Kügler <sebas@kde.org>
As pointed by jwhferguson, I changed "show average depth" to "show
mean depth".
I modified file preferences_graph.ui and changed the text. This bug was
reported on fedora 22. i use ubuntu.layout and justification is nicely
displayed.
The patch also removes a no longer necessary include.
See #922
Signed-off-by: krisalpha <choprakrishan61@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
- stop at bounds, this is in line with other flickables. I really
don't like Flickables floppy default behavior to allow dragging and
scrolling over the bounds.
Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
- As the list may get reset on save, the dive_id effectively changes
since currentItem isn't updated. So after editing, we end up with a
different currentItem than visible. This is very unintuitive, but
has to do with the model resetting. It would result in the edit view not
showing the current dive when opened the second time. Let's make sure
that out currentItem is always the visible one before we're filling
the data into the edit page.
- Close the drawer when we're navigating away from the dive item, for
example when hitting the back button.
Signed-off-by: Sebastian Kügler <sebas@kde.org>
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>
It was becomming too big, a smaller class is nicer to work wirh
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Also, the QtHelper.cpp file told me that some propertiies
where also TecDetails, graph related, so I moved them
to the correct preferences.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I didn't allowed the build on CMake for those files yet because
there will be tons of breackage, so when I finish, I'll allow.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This class needs to have all settings in Q_PROPERTIES
so it can be used in QML. I know we will not use all of the
settings in a visible way for the user on the QML app, but
we might increase things in the future and on different
form factors so it's good to be prepared.
Currently I implemented all of the possible properties, but
I still need to hoock up everything.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This finishes the first round of Simplication patches for the QML
basecode. The second one will be about the preferences.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
And also use existing helper function to get the GPS string
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I didn't understood the logic of the define & replace,
so maybe we want a few comments there.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>