Open vkareh opened 8 months ago
Build size and comparison to main: | Section | Size | Difference |
---|---|---|---|
text | 376044B | 1812B | |
data | 948B | 0B | |
bss | 63488B | 8B |
I think you could use the CheckboxList
class for the settings menu.
You can find it in src/displayapp/screens/CheckboxList.h
.
@minacode the badly-named CheckboxList
class only deals with single-selection settings (radio buttons)
Oh, ok. Maybe we should rename it to something like RadioButtonGroup
.
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.
Oh, ok. Maybe we should rename it to something like
RadioButtonGroup
.
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.
Do you think you could still extract an abstract component from your implementation? I could imagine that an actual checkbox list is common enough.
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.
Maybe it doesn't make sense though. That would be ok. I am just asking.
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.
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: