Icons used directly by Kirigami use /org/kde/kirigami
as prefix. Ex: previous and next icons on header.
Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
Icons used directly by Kirigami use /org/kde/kirigami
as prefix. Ex: previous button on the GlobalDrawer.
Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
We had turned this off since it caused rendering issues, but that
appears to be fixed now - and it should help to get us smoother
rendering of the dive list.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
And maybe this will make it faster as well? Depends on how the binding
is implemented, I guess.
But at least it's less confusing to read now.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This way the menu items describe what happens when you tap on that menu
item. That seems more consistent and intuitive.
See #1204
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In older versions of Kirigami this caused all kinds of problems so we
eventually gave up on it in commit 13c49276d1 (Revert "QML UI: make
dive list fold dive trips").
Now this seems to work much better, so let's bring back trip folding!
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead of showing the map zoomed over London by default,
initialize the center at [0,0] and show the whole globe.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
centerOnLocationHard() is added in MapPage.qml so that
on `firstRun` the map is hard panned to the desired location
without animation.
This affects the selection of a new "Dive details" -> "Map it" or
when opening a GPS location in the map.
The idea behind this change is to avoid starting the map animation
from an arbitrary location such as [0,0] or London. Also, to not
start the map zoomed out completely and then zoom in on a selected
dive.
For this change to work, add the helper getCoordinatesForUUID()
to qmlmapwidgethelper.cpp/.h and use it to obtain the
QGeoCoordinates for a dive site UUID.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
The background color in our own checkbox should match the page background.
Also includes some whitespace cleanup.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
In the initial move to comboboxes the correct location model
was not used. This uses the correct model and makes it behave
like the other comboboxes.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
When a dive has multiple buddies, pick the index of the first
to prevent the user from hanving to scroll through the entire
list when editing.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Removing the comparison of currentText vs editText when saving buddies
fixes the issue of data loss when dive has more than one buddy.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
The HintsTextEdit just doesn't feel natural and intuitive.
Edit, fixed rebase issues.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
When the slot pageStack.onCurrentItemChanged() is reached
make sure that the stackView becomes non-interactive.
This prevents swiping left on the map to "go back".
Also, always reload the map markers when the map becomes visible.
This is not optimal and instead something in the lines of:
DiveList.model.onChanged()
is a much better solution.
Ideally the map reload should happen on dive removal, dive addition,
dive edits and sync from cloud.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
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>
The Page object has the following functionality:
- reloadMap(): reload all map markers.
- centerOnDiveSiteUUID(): center the map on a dive site uuid.
- centerOnLocation(): the map on a latitude, longitude in decimal.
- Select a dive list entry based on a marker selected on the map via
diveList.setCurrentDiveListIndex()
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Add the setCurrentDiveListIndex() wrapper for:
diveListView.currentIndex = idx
wich also makes it possible to disable the scroll animation when
selecting dive list indexes which are too far apart.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Also a developer likes to see a nicely formatted page, so correct
some bugs in margin handling on the log page. There was a strange
multi-line whitespace on the top of the list, and the total width
of the page was (initially) a little smaller than full page, so
showing a small strip of the page left on the pageStack. This
just looks weird. So again, cosmetics only.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
See also 15cdcdbc6. There, we introduced the wideScreen (set to true)
to evade a (cosmetic) bug in (most likely) Kirigami. The top dive
was partially obscured on the start of the app. And by setting the
wideScreen to true, the application header became of a fixed height.
Numerous changes further in Kirigami, we can now set this property to
false. This results in a correctly displayed divelist at the start of
the app, and *also* an application header that correcly hides itself
when scrolling up, and displays itself again when scrolling down. So,
a behavior that is common to, for example, mobile brouwsers.
This all said. I still believe this is a workround for strange behavior.
In fact, we should not need to set this wideScreen property at all,
and Kirigami should behave correct in all cases (true, false, unset
at our end). It behaves correctly when set to true or false, but
still displays a partially hidden top item in the dive list when
unset.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This worked correctly while compiled against Qt 5.10.0, but after
installing Qt 5.10.1 the behavior was just wrong. And as there
seems no way to color the background of a Kirigami SwipeListItem,
just revert this, and accept the (slightly) inconsistent coloring
of the page (for now).
This reverts commit 6700715b5d.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Trivial and cosmetics only fix. The width of the rescan button
was forgotten, and this pushed the right margin to the right,
causing the combo menus to overflow the right margin.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
And another one. The SwipeListItem also needs to have a set
background color. Unfortunately, the lines between the
individual SwipeListItem disappeared, so, set the
smallest possible border on these items.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Also, this got broken after the Kirigami to verion 2.2 in main.qml.
So, set the header background color according to our theme setting.
Notice, that there is a remaining issue here. We could color the
text color in the header, but now, this seems impossible (or I
do not understand how and where to set this).
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
For some reason, after the update of the main.qml to version 2.2,
all Kirigami Pages and scrollablePages show up plain white.
So now, set a proper background for these pages.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This is subtle one. With the changing of the theme color, it
appeared that the hover and selected colors in the divelist
where wrong (as in, always blue-ish). This is easily solved
by setting the activeBackgroundColor to our theme color, and
Kirigami does the rest (tint and opaque settings for the
different states a selected dive can be in).
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This is a long standing issue. I wish to keep up with Kirigami developments
including new versions of their controls, but this is not always easy.
While we upgraded to Kirigmi 2.2 for most of our QML earlier, using this
new version of main.qml breaks numerous stuff. In fact, so much that
we just needed to wait.
With the progress in Kirigmi, it is now possible to upgrade, with still
some issues on our side to be fixed, but this is manageble now.
The main show-stopper was a construct to set our theme colors, for example:
Kirigami.Theme.highlightColor = Qt.binding(...)
This is not posssible any more, as the Kirigami.Theme has made these
readonly on their end.
This commit just removes the assignments to the now readonly theme
items. And the setting of a correct theme color for the action button.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Trivial removal of 2 unused Kirigami actions. These were leftovers
from the time we had a very different style of cloud account
management.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Commits fed2c5b6a1 and 572fc4707 erroneously deleted two
aliases. That is corrected here. Yes, QML with only runtime
errors can be a pain.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>