-
-
Notifications
You must be signed in to change notification settings - Fork 1k
settings: Add global widget selection #1959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Build size and comparison to main:
|
FintasticMan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is very useful, thanks!
ca33109 to
4eeadff
Compare
|
I think you could use the You can find it in |
|
@minacode the badly-named |
|
Oh, ok. Maybe we should rename it to something like Do you think you could still extract an abstract component from your implementation? I could imagine that an actual checkbox list is common enough. Maybe it doesn't make sense though. That would be ok. I am just asking. |
a02aef7 to
039506d
Compare
No, the name is based on the lvgl library, which uses checkbox as the naming. There is no radio component in lvgl, so the checkboxlist class emulates the radio behaviour by re-theming the checkboxes and overriding the select mechanism.
I did an initial PoC, but it means that now CheckboxList needs to return arrays of settings, whether it's a checkbox or a radio. This and the additional code required to make that work makes the entire thing to complex/bloated.
I can poke at it some more at another time, but likely out of scope for this PR. |
|
Ok, nice. Thanks for the detailed answer. Given that, I think your PR is fine the way it is now :) |
|
I've added new commits for configurable widgets on the Analog watch face. Attached screenshots to the description on top. |
d54ae36 to
168d9ca
Compare
49d5ec3 to
efdeebf
Compare
efdeebf to
8f10997
Compare
8f10997 to
eb9e02b
Compare
eb9e02b to
a673de8
Compare
a673de8 to
8e10a2d
Compare
8e10a2d to
c70d185
Compare
c70d185 to
291920e
Compare
5f365d9 to
42bc7d6
Compare
42bc7d6 to
3f8361a
Compare
7e62cde to
3fda05d
Compare
e9bafa8 to
d465d6c
Compare
d465d6c to
9ecfeca
Compare
9ecfeca to
370b973
Compare
370b973 to
a11aac6
Compare
|
I think it would be really great if we could get this merged soon, would you be able to fix build (CI is currently failing)? I can review after |
a11aac6 to
aac22a2
Compare
|
Fixed the build now. |
mark9064
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Just a few things:
- In the future there may be some way to modify settings over bluetooth. At the moment changing the enabled widgets could crash a watchface. I think it would be better if the watchfaces store the enabled widgets when they initialise. Maybe as simple as assigning the lvgl object fields to nullptr if they haven't been drawn and then checking if they're not null in
Refresh()? - The settings version needs bumping too
aac22a2 to
22a4d0f
Compare
22a4d0f to
28eb357
Compare
|
I have been pondering a refactor of watch faces so there is a core "watch" and the watch faces load this. The face would pass in refresh handlers and init handlers for all of the mini widgets -- weather, steps, bluetooth, battery, etc etc. This would allow for a consistent behavior of the widgets and the faces to decide how and what they render. This PR is a solid step in that direction. |
28eb357 to
9f38743
Compare
9f38743 to
0a2b1b4
Compare
0a2b1b4 to
6b3b91a
Compare
e103584 to
7ceabe5
Compare
7ceabe5 to
1edadc8
Compare
65e001a to
793aa10
Compare
84eaa72 to
67b2362
Compare
67b2362 to
714d612
Compare
Instead of each watch face implementing their own settings for which widgets to display, we can have a global selection of widgets. All watch faces can then determine whether it is enabled and so display it in whichever way makes sense for that face. Current widgets supported are heart rate, step counter, and weather.
714d612 to
cc66a8d
Compare
Instead of each watch face implementing their own settings for which widgets to display, we can have a global selection of widgets. All watch faces can then determine whether it is enabled and so display it in whichever way makes sense for that face.
Current widgets supported are heart rate, step counter, and weather.
Widgets off:


Widgets on:

