theme update to support text selection background

Fixes #1820
This commit is contained in:
Gabor Kiss-Vamosi
2020-10-07 12:23:24 +02:00
parent fff3a00de2
commit 1d50bc962d
3 changed files with 5 additions and 0 deletions

View File

@@ -12,6 +12,7 @@
- Add `text_sel_bg` style proeprty - Add `text_sel_bg` style proeprty
### Bugfixes ### Bugfixes
- Theme update to support text selection background
## v7.6.1 (06.10.2020) ## v7.6.1 (06.10.2020)

View File

@@ -204,6 +204,8 @@ static void basic_init(void)
lv_style_set_bg_color(&styles->scr, LV_STATE_DEFAULT, COLOR_SCR); lv_style_set_bg_color(&styles->scr, LV_STATE_DEFAULT, COLOR_SCR);
lv_style_set_text_color(&styles->scr, LV_STATE_DEFAULT, COLOR_SCR_TEXT); lv_style_set_text_color(&styles->scr, LV_STATE_DEFAULT, COLOR_SCR_TEXT);
lv_style_set_value_color(&styles->scr, LV_STATE_DEFAULT, COLOR_SCR_TEXT); lv_style_set_value_color(&styles->scr, LV_STATE_DEFAULT, COLOR_SCR_TEXT);
lv_style_set_text_sel_color(&styles->scr, LV_STATE_DEFAULT, COLOR_SCR_TEXT);
lv_style_set_text_sel_bg_color(&styles->scr, LV_STATE_DEFAULT, theme.color_primary);
lv_style_set_value_font(&styles->scr, LV_STATE_DEFAULT, theme.font_normal); lv_style_set_value_font(&styles->scr, LV_STATE_DEFAULT, theme.font_normal);
style_init_reset(&styles->bg); style_init_reset(&styles->bg);

View File

@@ -115,6 +115,8 @@ static void basic_init(void)
lv_style_set_bg_opa(&styles->scr, LV_STATE_DEFAULT, LV_OPA_COVER); lv_style_set_bg_opa(&styles->scr, LV_STATE_DEFAULT, LV_OPA_COVER);
lv_style_set_bg_color(&styles->scr, LV_STATE_DEFAULT, BG_COLOR); lv_style_set_bg_color(&styles->scr, LV_STATE_DEFAULT, BG_COLOR);
lv_style_set_text_color(&styles->scr, LV_STATE_DEFAULT, FG_COLOR); lv_style_set_text_color(&styles->scr, LV_STATE_DEFAULT, FG_COLOR);
lv_style_set_text_sel_color(&styles->scr, LV_STATE_DEFAULT, BG_COLOR);
lv_style_set_text_sel_bg_color(&styles->scr, LV_STATE_DEFAULT, FG_COLOR);
lv_style_set_value_color(&styles->scr, LV_STATE_DEFAULT, FG_COLOR); lv_style_set_value_color(&styles->scr, LV_STATE_DEFAULT, FG_COLOR);
style_init_reset(&styles->bg); style_init_reset(&styles->bg);