-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
feat(display): Set mono theme and add invert config #1754
Conversation
One question: Should we default to In that case it can be added as |
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.
Reviewing just to say I've been using this for a week and it's working as expected. Is there anything left to do to take this off Draft and get wider review?
On my end, the question on the previous comment is the main thing I want to clear up to figure out the best approach. |
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.
Working for me.
The config is currently named CONFIG_ZMK_DISPLAY_INVERT but maybe it should be CONFIG_ZMK_MONO_THEME_INVERT or something else?
I think what you have is fine unless mono is the only theme that will ever support being inverted.
Should we default to LV_USE_THEME_MONO unconditionally?
This seems like it would be an improvement to me, so long as it remains possible to override it to another theme. All of the most common displays to use with keyboards are monochrome.
Thanks for testing and the review @joelspadin, I changed to use the mono theme by default (using |
eb0bea6
to
37bd06b
Compare
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.
Just one minor code style comment. Otherwise LGTM. Thanks!
All displays currently used with ZMK are monochrome so it makes sense to enable the mono theme by default, which can be disabled by the user since we use the "imply" statement. Without this theme setting, the small font size selection for widgets at the bottom of the stock status screen does not work.
Looks like some conditional layers tests are failing but I couldn't reproduce locally 😕 Edit: Reruns after a force push seem to be succeeding OK. |
Add CONFIG_ZMK_DISPLAY_INVERT Kconfig to invert colors (black-on-white to white-on-black) on monochrome screens. Currently applies only if CONFIG_LV_USE_THEME_MONO is selected, which is the default unless user overrides it.
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.
Thanks!
Update
This PR sets
CONFIG_LV_USE_THEME_MONO
by default whenZMK_DISPLAY
is enabled, so that small font selection used in the built-in status screen widgets is no longer ineffective.It also adds a new Kconfig
ZMK_DISPLAY_INVERT
to invert the colors used in the display from black-on-white to white-on-black, by setting the appropriate value in mono theme initialization.Original
LVGL mono theme was getting selected by
ZMK_DISPLAY
but not actually used outside of thecorneish_zen
configuration. This change sets it by default if OLEDs or ls0xx memory displays like nice!view are used. This change could use some testing to make sure it doesn't break on OLEDs, nice!views, Adafruit memory displays etc. (Unfortunately I don't have any at the moment, tested on native_posix+SDL setup.)Given that the theme is set correctly, we can also add an invert option by setting the
dark_bg
parameter oflv_theme_mono_init
accordingly. The config is currently namedCONFIG_ZMK_DISPLAY_INVERT
but maybe it should beCONFIG_ZMK_MONO_THEME_INVERT
or something else? Also it is possible that there is a better way to make this change.