From 1f2a5a913b1982ccf0bef47f1ee92811d47a95a1 Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Thu, 4 Nov 2021 19:31:43 +0100 Subject: [PATCH] LVGL set screen background to black --- tasmota/xdrv_54_lvgl.ino | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tasmota/xdrv_54_lvgl.ino b/tasmota/xdrv_54_lvgl.ino index 666ba912f..9d5855099 100644 --- a/tasmota/xdrv_54_lvgl.ino +++ b/tasmota/xdrv_54_lvgl.ino @@ -401,6 +401,9 @@ void start_lvgl(const char * uconfig) { // Set the default background color of the display // This is normally overriden by an opaque screen on top #ifdef USE_BERRY + // By default set the display color to black and opacity to 100% + lv_disp_set_bg_color(NULL, lv_color_from_uint32(USE_LVGL_BG_DEFAULT)); + lv_disp_set_bg_opa(NULL, LV_OPA_COVER); lv_obj_set_style_bg_color(lv_scr_act(), lv_color_from_uint32(USE_LVGL_BG_DEFAULT), LV_PART_MAIN | LV_STATE_DEFAULT); lv_obj_set_style_bg_opa(lv_scr_act(), LV_OPA_COVER, LV_PART_MAIN | LV_STATE_DEFAULT);