fix(color): Logical switches monitor fix#2410
Conversation
|
I would have strongly preferred the ButtonMatrix. Was there an issue with taking that route? we should avoid having Styles created and applied in object constructors when possible, as it is rather slow. It this particular case it is also leaking memory, as the styles need to be destroyed after use (LVGL is not C++). |
|
I implemented with ButtonMatrix first. It worked well except one behaviour. The focus/editing thing caused a lot of problems. The whole matrix was a widget, so normaly you need to push the Enter to start editing mode. Then you can scroll the focus with the scroll button, but if you press the Enter again, then you leave the editing mode and lose the selection. I spent hours to find an elegant solution, but it required so much hacking I gave up around 1am. Then I tried to fix the current code, and this way looked as an option. Now it works, but the implementation is not valid yet, so I thought I will sleep first and refine it after. |
|
Actually we can do with direct change too skipping the styles, just I thought it is a good was to create a complete setting for each state. |
|
@raphaelcoeffic What do you think about defining and using a custom state as it is in this version? |
This is the right way to go, for sure. However, this is basically the same as The only difference I see here to the style that covers that state is:
I understand the use of Bold, but we should probably keep the same colours for sake of consistency. |
|
The style settings are from the orignal code to look the same as it was. |
This is something lots of people have complained about. So maybe we should change the generic style to use |
I think it is a good idea to change that color. After a certain age we really appreciate the contrast. Also the bold font could be default for the checked state. However the |
Age has nothing to do with it... I'm not that old and I still appreciate good contrast... 😀 |
I'm also not old, just my minimum focus distance is increasing. |
I am slowly getting in the area where things are either too far away or too close, but there is no point, where I can look sharp. |
|
Thankfully (or not) mine should never change now... had cataract surgery a couple of years ago so fixed focus vision now - unless the warranty runs out on the lenses 🙃 |
|
I assume the default |
|
This generally looks a lot better, as well as on the NV14. Thanks for that! I'll play with the styles in a separate PR, now that this sets the foundations for that. |
* fix(color): Logical switches monitor fix * Direct button style modification. * Using a custom state * Using the default CHECKED style. Adaptation to portrait mode.
Fixes #2384
Summary of changes:
This patch uses styles for active and non active buttons. The style defines colors and fonts for each logical switch state.