Currently the spinner uses exclusive max when wrapping from low to high
and inclusive max when wrapping from high to low. Fix this by adopting
*inclusive* max everywhere. The call sites are similarly confused.
Fix this!
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
The title will render with the last font used, and this isn't always
right for the ConfirmationView. Setting the font explicitly solves that
issue.
Signed-off-by: Miguel Rochefort <miguelrochefort@gmail.com>
Replace the pixelated Yes/No buttons with text based alternatives.
This also required changes to the pager to change the way the
redraw after changing view is implemented (improved muting and a reset
of the colours).
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
The checkbox uses the _im(mutable) idiom to minimize the RAM overhead
of its immutable properties (position and label). However it can be useful
to retrieve the label to provide a property accessor.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
By default bright and mid are white/grey tones, the ui widgets are
blue and the spot colours are different variants of orange.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
The ConfirmationView became broken when we converted it's images over to
2-bit RLE. That happened because the confirmation view relied on the
the 1-bit RLE to dynamically generate hit boxes.
Currently the code pre-calculates the hit box which is a waste of RAM.
Let's rip out the existing hit box logic and replace it with much larger
("fat finger") hit targets.
We make the touch() method more closely adopt the idioms of other UI
components (e.g. don't return the dialog status... just whether or
not we handled the touch).
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
We are able to add this to the self tests without having to create a
special page. Instead we can modify the existing notifications test
to utilize the spinner.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently the battery icon is overlarge compared to other status bar
icons such as the BT and notification icons (both of which are 32px
high). Fix this by redrawing the battery artwork and updating
the widgets in the status bar.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Add the battery frame to the theme so it matches the frame used for
charging and rename accordingly.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
This theming engine uses a bytestring (but supports anything indexable,
as long as the index results are a byte long),
stored as `wasp.system._theme`.
It has a default value, which should not change anything about the way this looks currently.
The theme can be set via `wasp.system.set_theme`,
but this should *ONLY* be used in `main.py`.
`wasp.system.set_theme` will return True if it was successful,
or False if the theme is of an old format.
Using an old format theme will *not* crash the watch,
but will use the default theme instead.
To theme this, one has to use tools/themer.py (use flag -h for complete explanation)
to generate a bytestring that's added in main.py (see diff).
The bytestring is then loaded into 'wasp.system._theme'.
Theme values can be looked up by apps by using `wasp.system.theme("theme-key")`.
Theme keys appear in the function body of `wasp.system.theme()`.
I've took the liberty of converting existing apps to use this method,
and it seems to work well.
A test theme is provided in `tools/test_theme.py`
Signed-off-by: kozova1 <mug66kk@gmail.com>
When the buttons are pressed then the widget should be dismissed. There
is no reason to make the caller handle that.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Signed-off-by: Aidan Houlihan <aidandhoulihan@gmail.com>
[daniel@redfelineninja.org.uk: Minor changes to .gitignore]
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently if we wake the watch exactly N hours (where N is integer)
after it goes to sleep then the time will not be updated. Fix this the
obvious way.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently if the real battery level is <5% then a redraw from scratch will
not draw the outline of the battery. Fix this by adding a special case for
negative previous states (-1 charging, -2 redraw).
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
This is intended to be reused by any app that shows the clock as part
of the status bar at the top of the display.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Notifier was a dumb name so make it better. Now that we have a decent
name it should be obvious how to handle the BLE connection status icon!
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
This requires a modified version of Gadgetbridge and currently works by
implementing the BangleJS protocol.
In Gadgetbridge ensure "Sync time" is *not* set and choose "Don't pair"
when adding the PineTime device.
As we enrich the navigation options we will increasinly need to visualize
between apps where up/down will switch us between rings and there
up/down is needed to scroll through content.