Having subsurface-core as a directory name really messes with
autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an
autocomplete conflict and also was inconsistent with the desktop-widget
name for the directory containing the "other" UI.
And while cleaning up the resulting change in the path name for include
files, I decided to clean up those even more to make them consistent
overall.
This could have been handled in more commits, but since this requires a
make clean before the build, it seemed more sensible to do it all in one.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This requires changes to Kirigami that aren't upstream, yet. So there's
a chance that this commit will have to be changed or reverted / redone.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This looks a little rough, but I think it works well. I'm sure it could
be prettier, though. The next patch will just do the white space cleanup
for the additional indentation level.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This seems like a useful default action when people are looking at the dive
list (and it's a request from a user to have this as a button instead of just
via the menu).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Make the lines that together form one dive move closer together so the dives
visually stand out more.
(this also includes small white space change, oops)
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This merge was a bit more challenging given how far things had diverged,
but I hope I got it mostly right.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Create small visible separation from the dive trip before. And make the dive
trip header a slightly different color so they stand out between dives.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This makes it MUCH easier to deal with a lot of dives.
Instead of needing a more complicated model we simply use the meta data that
allows us to create the dive trip sections to hide (make invisible + height 0)
all dives that aren't in the selected trip.
I'll admit that this was much easier than I expected it to be.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We received suggestions from users to darken the text color in the dive
list a bit and this does seem to be a lot more readable. Especially since
people are likely to use this outdoors the higher contrast seems
reasonable.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
first quick and dirty port of the imports to Kirigami 1.0
(using system installed for now) adapt to api changes and
try out some of the proposed ui changes from the HIG
Signed-off-by: Marco Martin <notmart@gmail.com>
This is more consistent with the rest of our UI
To make this work you once again need changes to the mobile components
that aren't upstream, yet.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This doesn't quite work yet as the start page appears to miscalculate its
height (the cloud credentials page appears to be missing).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
With the integration of the credentials into the start page the logic for
this has changed.
Since the code for start page and dive list is actually on the same page,
using opacity to switch between the two sub pages (depending on whether we
have valid credentials and dives to show), the old way of changing
credentials no longer worked.
With theis patch the user once again can change their credentials (and
change their mind and go back to the dive list).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Warning M126: == and != may perform type coercion, use === or !== to avoid it
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The fix for correctly showing multiple trips with the same location text
inadvertantly broke the detection of empty location text.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The way sectioning of the dive list works is by watching for different strings
in the section.property. In order to be able to tell different trips apart we
combine the address of the dive trip variable with the location (which will
create a new section for a new trip, even if the location text is the same) and
then strip that information out before showing the trip header.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is a multi-part message in MIME format.
After fixing the regression (commit 9e9d220c98) strange double dashes
appeared in the Divelist headers for trips. Just suppress it.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
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>
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>
In commit 25aa80846b ("Move Dive class from qthelper.h/cpp to it's own file")
the meaning of getting the "date" of a dive was changed to just be the date and
not the date and time. That's not what the QML code expected.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Small error was introduced in commit 25aa80846b. The dive.location was
shown in the DiveList instead of the intended dive.number
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
and rename it to DiveObjectHelper, since it should be an QObject
based class to make it easier on the QML, grantlee and widgets
side to display the dive's internal data.
each Q_PROPERTY defined in the DiveObjectHelper.h file
can be acessed directly via it's name.
So, if you are on a model that returns a dive, acess it's name
by dive.name
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
- flickable is gone, Page now just takes the children items, meaning we
can remove this assignment
- BasicListItem is factored out, and we now need it in our qrc
Signed-off-by: Sebastian Kügler <sebas@kde.org>
This increases the rather conservative value for the maximum velocity of
the divelist to scroll at max 5 screens per second, meaning it's about 4
times faster. I've picked this value after a bit of testing, it can
surely be tweaked, but feels nicer already.
Signed-off-by: Sebastian Kügler <sebas@kde.org>
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>
Spacing around pages is half a grid unit, as consistent with (some of
the) other pages. For the dive list, it's slightly more complicated:
We want the list items to reach the edges on both side as to increase
the interactive area. We have to apply the spacing left and right inside
the listitems. This patch does that.
Another consistency fix with other pages is that we're now adding a
header at the top of the dive list, which scrolles with the list view.
Signed-off-by: Sebastian Kügler <sebas@kde.org>
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>
Specifying a negative margin means that we negate the margin that the
ListItem so carefully figures out for us, don't do that.
Signed-off-by: Sebastian Kügler <sebas@kde.org>
- Replace the custom text items with the Components' label
- Remove now unneeded properties
The goal is to use less different font sizes, as to give the listview a
calmer and more uniform look.
Signed-off-by: Sebastian Kügler <sebas@kde.org>
The ApplicationWindow component has an internal PageRow for the
management of the application's pages, use that instead of an
own StackView.
Use shared components for common things in the app
ListItem for the dive list
Page for application pages, for correct background color
and moving of the action button
Signed-off-by: Marco Martin <notmart@gmail.com>
Signed-off-by: Sebastian Kügler <sebas@kde.org>
This makes things like accent(Text)Color and our two custom point sizes
for fonts resolve correctly again.
Signed-off-by: Sebastian Kügler <sebas@kde.org>
- anchor the label to the left of the date field
- elide the text instead
This fixes the bug in the dive list where the dive's location overflowed
over the date, especially visible on phones in portrait mode.
Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
- word-wrap and style the log message at the bottom, this should fix
clipping of error messages down there
- introduce units.smallPointSize, which defines a small font size to use
for toned-down display elements (e.g. the date in the dive list)
- No need to assign the default value to Text.text
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use the view, rather than the model to check if the list is empty. This
allows us to use the property notifiers rather than a function call, and
hence fixes updating the visibility of the startpage when the listview
gets filled (or emptied).
Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>