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.
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.
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.
This makes it possible for the mobile app on Android to use the camera.
We only ask for permission when the user actively goes to the 'QR-Scan'
tab, and we show a simple preview of the camera feed.
Notice that the permissions stuff is quite ugly right now due to Qt
having that module in development and the public APIs are simply not
available yet. But at least it works, which is all that matters.
When the next minor Qt release comes out we can hopefully clean this
up and use a version that needs no ifdefs.
We moved the initial-sync-height from the view to the model, which gives
a more logical progress update when switching between accounts.
Also added a button on the listview to instantly jump to the top of the
list.
Instead of storing the internet data in reverse, we now simply take the
view-requests and revert those.
This makes the amount of places where we have to account for the
reversal much less (now just one) which helps maintainability.
Additionally, bring back the section-is-an-enum idea to avoid a
string-malloc for each row when one per section is enough.
This improves the TextButton to be more re-usable and have an arrow to
make it clear it actually is a button.
Added a sub-text as well.
This made it really easy to make an About page with some subpages or
external links.
Also increased the top-header from 40 to 50 'pixels'.
Importing a key as private as possible means we don't check some central
indexing server for the first time an imported key or seed is used.
But, to avoid scanning the entire blockchain, we go back only as far
as the first usage that the user remembers.
Now, instead of asking a blockheight (which most users have no clue
about) we now ask for a year / month combo and start scanning from
the block at the beginning of that timespan.
As most of our app will be based on Pages pushed to the stack,
a simple structure to move focus forcefully to the new child
has been added.
Children would basically only need to mark the first item as
taking focus.
This approach works great for touch events, not so wonderful for mouse
events as it stops me being able to swipe on lists with the mouse.
So disable this on platforms that don't use touch primarily.