forked from kofal.net/zmk
feat(display): Add setting to invert display colors
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.
This commit is contained in:
committed by
Pete Johanson
parent
7e29166c6c
commit
864394b40a
@@ -15,6 +15,13 @@ config ZMK_DISPLAY_BLANK_ON_IDLE
|
||||
bool "Blank display on idle"
|
||||
default y if SSD1306
|
||||
|
||||
if LV_USE_THEME_MONO
|
||||
|
||||
config ZMK_DISPLAY_INVERT
|
||||
bool "Invert display colors"
|
||||
|
||||
endif
|
||||
|
||||
choice LV_TXT_ENC
|
||||
default LV_TXT_ENC_UTF8
|
||||
|
||||
|
||||
@@ -91,7 +91,8 @@ int zmk_display_is_initialized() { return initialized; }
|
||||
static void initialize_theme() {
|
||||
#if IS_ENABLED(CONFIG_LV_USE_THEME_MONO)
|
||||
lv_disp_t *disp = lv_disp_get_default();
|
||||
lv_theme_t *theme = lv_theme_mono_init(disp, false, CONFIG_LV_FONT_DEFAULT);
|
||||
lv_theme_t *theme =
|
||||
lv_theme_mono_init(disp, IS_ENABLED(CONFIG_ZMK_DISPLAY_INVERT), CONFIG_LV_FONT_DEFAULT);
|
||||
theme->font_small = CONFIG_ZMK_LV_FONT_DEFAULT_SMALL;
|
||||
|
||||
disp->theme = theme;
|
||||
|
||||
Reference in New Issue
Block a user