Skip to content

Conversation

NeroBurner
Copy link
Contributor

@NeroBurner NeroBurner commented Sep 17, 2024

Update CheckboxList.h to optionally be able to get checkboxes (instead of the default of radio-buttons) and be able to have multi-selection through a new callback.

Use these updated capabilities of CheckboxList.h to replace the nearly identical code of SettingWakeUp.h

One noticable change is that previously all 5 wake-up-settings were on the same page. But with this PR and the default value of 4 settings per screen on CheckboxList.h we have two pages

Before:

InfiniSim_2024-09-18_203919_wakeup_main

Now:
InfiniSim_2024-09-18_203600_wakeup_checkboxlist1 InfiniSim_2024-09-18_203610_wakeup_checkboxlist2

@NeroBurner NeroBurner added the maintenance Background work label Sep 17, 2024
@NeroBurner NeroBurner marked this pull request as draft September 17, 2024 21:56
Copy link

Build size and comparison to main:

Section Size Difference
text 374712B 528B
data 948B 0B
bss 63480B 0B

Update `CheckboxList.h` to optionally be able to get checkboxes (instead
of the default of radio-buttons) and be able to have multi-selection
through a new callback.

Use these updated capabilities of `CheckboxList.h` to replace the nearly
identical code of `SettingWakeUp.h`

One noticable change is that previously all 5 wake-up-settings were on the
same page. But with this PR and the default value of 4 settings per screen
on `CheckboxList.h` we have two pages.
@NeroBurner NeroBurner force-pushed the checkboxlist_for_settingWakeUp branch from 3bd5277 to d5e3dff Compare September 18, 2024 18:43
@NeroBurner NeroBurner marked this pull request as ready for review September 18, 2024 18:44
@NeroBurner NeroBurner requested a review from a team September 18, 2024 18:45
@NeroBurner NeroBurner added this to the 1.16.0 milestone Sep 19, 2024
@minacode
Copy link
Contributor

I like the idea and the implementation via the IsChecked function.

I am only reading the code right now, but think we can simplify the interface. If I understand it correctly, the function is provided for checkboxes and the original value is provided for radio buttons? Can we infer the style from that and omit the boolean flag? And maybe make the original value optional, if it is not always needed?

Copy link
Contributor

@minacode minacode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comment above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Background work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants