From 1d50bc962d7b36ae10db02f138d2b5085be92839 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 7 Oct 2020 12:23:24 +0200 Subject: [PATCH] theme update to support text selection background Fixes #1820 --- CHANGELOG.md | 1 + src/lv_themes/lv_theme_material.c | 2 ++ src/lv_themes/lv_theme_mono.c | 2 ++ 3 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8561f5a1..337a81601 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - Add `text_sel_bg` style proeprty ### Bugfixes +- Theme update to support text selection background ## v7.6.1 (06.10.2020) diff --git a/src/lv_themes/lv_theme_material.c b/src/lv_themes/lv_theme_material.c index 29878ca4e..372f8a0e8 100644 --- a/src/lv_themes/lv_theme_material.c +++ b/src/lv_themes/lv_theme_material.c @@ -204,6 +204,8 @@ static void basic_init(void) 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_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); style_init_reset(&styles->bg); diff --git a/src/lv_themes/lv_theme_mono.c b/src/lv_themes/lv_theme_mono.c index 1710f5cf7..6c8a8bfaf 100644 --- a/src/lv_themes/lv_theme_mono.c +++ b/src/lv_themes/lv_theme_mono.c @@ -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_color(&styles->scr, LV_STATE_DEFAULT, BG_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); style_init_reset(&styles->bg);