QML has ways to style icons - and we use that for the main theme color,
but it doesn't seem to work (anymore?) for the edit and save icons.
Instead of tracking down what changed there, simply switch between icons
with different foreground color, depending on theme.
All the other icons seem to work well in all three themes.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This looks extremely fishy to me, but it does seem sufficient to
get the forward and backward buttons to show up in the toolbar.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Whatever I try, the toolbar background is always based on the 'active'
color set in qtquickcontrols2.conf, not on anything that I can set in
QML code. So in an effort to brute-force the issue, this hardcodes the
subsurfaceTheme value in the toolbar UI code of Kirigami.
To make this easier, this (and one of the other hacks) is added to the
existing kirigami.diff.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The hack to remove the action button caused situations where the action
button didn't return. Let's skip that for now. All the other fixes
appear to still be needed.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Initial implementation/prototype of copy-paste support for
Subsurface-mobile. The UI part is really lacking; right now the copy
button is initially visible and paste is achieved by long press on a
dive and clicking the paste button when it appears. Delete is currently
not possible at all, as I just failed to layout the buttons properly
using QML. It just sounds so simple, to put all the copy-paste-delete
buttons next to each other...
The data to be copied is currently hard-coded. A dialog to choose
inteded fields would be nice, but it'll take quite a bit effort to get
used to QML enough to be able to hack something together.
Anyway, this seems to work, even though the UI is not always reflecting
the paste without switching dives (when testing on laptop).
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
We want to be able to roll our own banner image, logo, title, and other
information in the GlobalDrawer - but Kirigami adds an ugly margin
around that. This attempts to remove that margin (but for some reason
there is still a margin on the left side).
This requires the patch command to be installed, but because of the
context sensitivity of the changes, I couldn't figure out how to do
this with sed or perl (which we already require).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This gets delete dive working properly.
Kirigami passive notification ends up hijacking area where the
"Add dive" or "Delete" or "Discard" buttons are shown. So after
deleting a dive the "Undo" button from the notification
keeps handling the touch events even when not visible.
Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
This is definitely a hack.
Do not include the Kirigami resources (on static build). It causes
double defined symbols in our setting. I would like a nicer fix for this
issue, but failed to find one. For example, not adding the resource in
our build causes the qrc file not to be generated. Manual generation
of the resource file (using rcc) introduces the double symbols again.
so it seems some Kirigami weirdness (but their staticcmake example compiles
correctly).
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
While most new commits are QML improvements, there is a change
in the Kirigami build related to static building (like we do),
and Cmake restyles to make things more Qt compliant.
As now the (generated) qrc_kirigami.cpp is included from
kirigamiplugin.cpp, for static builds, our build failes on
double defined symbols.
Following commit deals with this fail.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit consists of the following 3 parts:
1. There are 2 source files added, adapt our build process
accordingly.
2. Due to a change in icon and kirigami QML prefixes, we need to
adapt for this as well. Changed mobile-resources.qrc for that.
When this would not be changed, the icons will not be found.
3. To further prepare for the future, abandon the iconName
property in favour of the new icon grouped property, which
can have more attributes than only the name. But currently
it is only a syntactic change.
Tested on Android device, and no visible changes.
Signedoff-by: Jan Mulder <jlmulder@xs4all.nl
Notice this is not the current master. Do not go there
right now. Kirigami SHA f8ee631aac787b60 introduces
a failing load of our main.qml (tested with both
Kirigami 2.0 and 2.2).
This SHA is safe.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Switch to a newer SHA, so that at least my commit is in. Checked
the newer version, and no other artefacts seen. I think we
should try to follow master where we can (but controlled).
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Following master is just not healthy. We need to be more deliberate
in which version we built against. An update in the last 24 hours
broke Subsurface-mobile again.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This reverts commit 893ff019dbabf356a477da0bdf7d954123759018.
Thanks to the amazing support from Marco Martin the theming issue in
Kirigami master has been fixed.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This extends the hack in commit 2e057bc29a ("QML UI: hide action button
when keyboard is visible") to the left and right button as well.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Until we get some solution from upstream this patch to Kirigami hides the action button when the keyboard is visible.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
This adds the right handle icon that is needed for the swipe list items not to report an error when activated.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Now that we support this for many dive computers, that seem reasonable.
I'm not happy with the icon, but couldn't figure out a better one in the
breeze icon set.
See #426
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In order to avoid surprises with things suddenly breaking, check out
the release tag of Kirigami 2.1 for now. We still need to track what's
happening in Kirigami, but this was Marco's advise as well.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Completely adapt to the api changes of OverlaySheet in Kirigami2
in order to achieve the same look and behavior for the dive
edits that had with kirigami1
Port most components to QtQuickContrls2, except comboboxes
in the dive edit sheet that will need a new control type
Signed-off-by: Marco Martin <notmart@gmail.com>
This (plus an update to kirigami.pri, a patch for which I just sent
to the plasma-devel list) allows the iOS version of Subsurface-mobile
to build again.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Now kirigami needs to be built with a C++ plugin.
In cases of mobile operating systems such as iOS (and in a lesser measuse,
Android) having a proper plugin loaded at runtime may be difficult, so
statically link it together with all of its qml files compiled as a
qresource inside the static library.
Signed-off-by: Marco Martin <notmart@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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 just allows the script to be used when you are working locally on
Kirigami to test changes - no point in waiting for a pull from upstream
then. The only goal is to copy the files over.
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>
This is just the UI, the actual deletion is not yet implemented.
I really like this interaction with the list items. Slide them to the left and
you see icons for actions. Right now we have just one and that may seem like
overkill (hey, we could just have the delete icon instead of the application
menu icon, right?) but once we allow the ability to show the GPS location on a
map we'll have two operations and this will make more sense.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Normally this is done in the build.sh script when building
Subsurface-mobile - but some people might have set up their build
enviroment differently and for them this allows to pull (and update) these
components from upstream without having to run build.sh
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>