New look for settings and less duplicate code#442
New look for settings and less duplicate code#442Riksu9000 wants to merge 7 commits intoInfiniTimeOrg:developfrom Riksu9000:update_settings
Conversation
|
Added support for multiple selected options, making SettingWakeUp compatible again. |
|
I've tested this, it works, I like it. I think the validate/reset buttons in the Firmware app could do with enlarging and maybe the step goal buttons too? edit: ignore this, I just saw the other changes in #429, very nice |
|
A small little opinion! Is it possible to put a slider that allows for a custom screen timeout between 5-30seconds and then goes to a "never" option that sets the value to an insanely high value (1^100 seconds etc) |
That's a good idea, but isn't directly related to this PR. This PR might also end up getting scrapped if we end up sticking with LVGL checkboxes. And if what you propose was implemented, there would be even less of a need for this CheckBoxes screen. |
I created a new CheckBoxes screen that apps can use to display options. It works similar to Tile and List.
Apps provide the title and an array of Options. This array is updated by the CheckBoxes screen when an option is picked. On exit, the previous app can check the array for changes, and handle them appropriately.
All of the settings screens which used checkboxes have been converted to use the new CheckBoxes screen. A lot of duplicate code has been removed.
EDIT: I was thinking if the 6 button layout should be separated from CheckBoxes. Soon we might have more than four watch faces for example, and since the names are quite long, they wouldn't fit in that layout. This however is easy to work around by simply adding scrolling like in List to CheckBoxes, and only providing four options for a single page. So in the end I don't think it should be separated to reduce duplicate code.