Interaction for a checkbox has basically been done already in the QQC2
template, so avoid duplicating work and just inherit from it.
This fixes a UX issue when sometimes a checkbox loses its binding on
click.
This shows all wallets and wallet details.
Additionally, this moves the AccountTypeLabel out of the desktop page to
be reusable. Not so much because its hard, but because they have
translations and we'd better push shared translations into the common
translation unit as opposed to duplicating it.
The LabelWithClipboard now has as default context-menu-item text "Copy"
instead of "Copy Address".
Working with the UX guy we massively improved the account selector.
Instead of trying to shoe-horn the 'add account' under a non-existing
account we realized it fits better on its own. Even the moving of it
after adding one will not cause too big a problem due to the
different look afterwards.
The actual opened menu will also behave better if you have more than
one account in this new design and more predictable.
The 'text' and 'windowText' were both used like they were the same
thing, which they currently are but don't have to be.
Now migrate the various cases where to we use 'text' to 'windowText'.
This choice is made because the Label object uses windowText by default.
In future we might want to make the 'text' one have a slightly different
color. Its still used in Qt components like the popup menu.
This adds a prettty cutout screen and better feedback on the camera view
popping up.
We also make visible the scan overlay instantly, hiding out any other UI
that is hidden beneath it.
We correctly handle various odd issues with Qt / Android.
- the permissions request (QFuture) returned in a different thread, we
now move back to the main thread before doing any calls on the
multimedia objects.
- The popping up of the android permissions requestor actually makes the
app think its being made inactive. Now we no longer cancel the QR scan
request in such cases.
Moving the text line up would allow the virtual keyboard to have more
space and likely that the top-level button to get out of the screen
stays visible.
I.e. users don't have to manually hide the keyboard to continue.
The 3 icons at the top of the account screen now have 2 with actual
icons. They don't look very good, but at least its better than no
icons.
Also I stole most of the receive screen from desktop and ported it here.
Quick and dirty as that screen has been long overdue for a refresh.
When the user changes unit (BCH / mBCH), the widget would not update
until you typed something. Creating a surprise moment.
This fixes that, at the expense of a seemingly innocent warning by QML
about a binding loop.
It now feels like a premature optimization to make anything
that inherets from Page be wrapped in a grid layout.
Notice that a "Page" here is the thing we push on the card-stack, the
Page has the back icon and the header text.
After working on android and the qtmultimedia library for a week,
I have a much better understanding of what works and what doesn't.
The resulting design is thus presented. We will have one
CameraController class which refers to one overlay panel in QML
and in different places in the GUI objects based on QRScanner
can be created to initiate a scan.
This additionally moves the actual scanning out of the GUI thread
since blocking that is a no-no.
Now to move towards actually supporting scanning usecases.
This takes the camera feed and pipes it through the ZXing (pronounced
zebra-crossing) library which detects the barcodes in the image.
When we find it, we pluck out the text.