From da4a706e230a6fc9c67033c69a9c39d1a4b675f9 Mon Sep 17 00:00:00 2001 From: Boris Faure Date: Wed, 28 Sep 2022 22:52:45 +0200 Subject: [PATCH] win: change the background color when the theme/colorscheme changes --- src/bin/win.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/bin/win.c b/src/bin/win.c index e678f23c..e1ad3f60 100644 --- a/src/bin/win.c +++ b/src/bin/win.c @@ -1072,13 +1072,6 @@ _term_trans(Term *term) } else { - if (wn->config->color_scheme) - { - evas_object_color_set(wn->backbg, - wn->config->color_scheme->bg.r, - wn->config->color_scheme->bg.g, - wn->config->color_scheme->bg.b, 255); - } elm_win_alpha_set(wn->win, EINA_FALSE); evas_object_show(wn->backbg); wn->translucent = EINA_FALSE; @@ -5924,6 +5917,7 @@ void change_theme(Evas_Object *win, Config *config) { const Eina_List *terms, *l; Term *term; + Win *wn; terms = terms_from_win_object(win); if (!terms) return; @@ -5942,6 +5936,17 @@ void change_theme(Evas_Object *win, Config *config) if (l) l = eina_list_last(l); if (l) elm_theme_extension_del(NULL, l->data); elm_theme_extension_add(NULL, config_theme_path_get(config)); + + EINA_LIST_FOREACH(wins, l, wn) + { + if (config->color_scheme) + { + evas_object_color_set(wn->backbg, + config->color_scheme->bg.r, + config->color_scheme->bg.g, + config->color_scheme->bg.b, 255); + } + } main_trans_update(); }