transparancy: update other widgets.

This commit is contained in:
Alastair Poole 2018-08-06 18:17:35 +01:00
parent 86c7fb800d
commit a15f318728
5 changed files with 9 additions and 4 deletions

View File

@ -351,12 +351,14 @@ _edi_consolepanel_config_changed(void *data EINA_UNUSED, int type EINA_UNUSED, v
{ {
elm_code_widget_font_set(widget, _edi_project_config->font.name, _edi_project_config->font.size); elm_code_widget_font_set(widget, _edi_project_config->font.name, _edi_project_config->font.size);
edi_theme_elm_code_set(widget, _edi_project_config->gui.theme); edi_theme_elm_code_set(widget, _edi_project_config->gui.theme);
edi_theme_elm_code_alpha_set(widget);
} }
EINA_LIST_FOREACH(_edi_test_code->widgets, item, widget) EINA_LIST_FOREACH(_edi_test_code->widgets, item, widget)
{ {
elm_code_widget_font_set(widget, _edi_project_config->font.name, _edi_project_config->font.size); elm_code_widget_font_set(widget, _edi_project_config->font.name, _edi_project_config->font.size);
edi_theme_elm_code_set(widget, _edi_project_config->gui.theme); edi_theme_elm_code_set(widget, _edi_project_config->gui.theme);
edi_theme_elm_code_alpha_set(widget);
} }
return ECORE_CALLBACK_RENEW; return ECORE_CALLBACK_RENEW;

View File

@ -38,6 +38,7 @@ _edi_debugpanel_config_changed(void *data EINA_UNUSED, int type EINA_UNUSED, voi
{ {
elm_code_widget_font_set(_info_widget, _edi_project_config->font.name, _edi_project_config->font.size); elm_code_widget_font_set(_info_widget, _edi_project_config->font.name, _edi_project_config->font.size);
edi_theme_elm_code_set(_info_widget, _edi_project_config->gui.theme); edi_theme_elm_code_set(_info_widget, _edi_project_config->gui.theme);
edi_theme_elm_code_alpha_set(_info_widget);
return ECORE_CALLBACK_RENEW; return ECORE_CALLBACK_RENEW;
} }

View File

@ -74,6 +74,7 @@ _edi_logpanel_config_changed(void *data EINA_UNUSED, int type EINA_UNUSED, void
{ {
elm_code_widget_font_set(_info_widget, _edi_project_config->font.name, _edi_project_config->font.size); elm_code_widget_font_set(_info_widget, _edi_project_config->font.name, _edi_project_config->font.size);
edi_theme_elm_code_set(_info_widget, _edi_project_config->gui.theme); edi_theme_elm_code_set(_info_widget, _edi_project_config->gui.theme);
edi_theme_elm_code_alpha_set(_info_widget);
return ECORE_CALLBACK_RENEW; return ECORE_CALLBACK_RENEW;
} }

View File

@ -28,6 +28,7 @@ _edi_searchpanel_config_changed_cb(void *data EINA_UNUSED, int type EINA_UNUSED,
{ {
elm_code_widget_font_set(_info_widget, _edi_project_config->font.name, _edi_project_config->font.size); elm_code_widget_font_set(_info_widget, _edi_project_config->font.name, _edi_project_config->font.size);
edi_theme_elm_code_set(_info_widget, _edi_project_config->gui.theme); edi_theme_elm_code_set(_info_widget, _edi_project_config->gui.theme);
edi_theme_elm_code_alpha_set(_info_widget);
return ECORE_CALLBACK_RENEW; return ECORE_CALLBACK_RENEW;
} }
@ -610,6 +611,7 @@ _edi_taskspanel_config_changed_cb(void *data EINA_UNUSED, int type EINA_UNUSED,
{ {
elm_code_widget_font_set(_tasks_widget, _edi_project_config->font.name, _edi_project_config->font.size); elm_code_widget_font_set(_tasks_widget, _edi_project_config->font.name, _edi_project_config->font.size);
edi_theme_elm_code_set(_tasks_widget, _edi_project_config->gui.theme); edi_theme_elm_code_set(_tasks_widget, _edi_project_config->gui.theme);
edi_theme_elm_code_alpha_set(_tasks_widget);
return ECORE_CALLBACK_RENEW; return ECORE_CALLBACK_RENEW;
} }

View File

@ -21,7 +21,6 @@ edi_theme_window_alpha_set(void)
{ {
Evas_Object *win, *bg, *mainbox; Evas_Object *win, *bg, *mainbox;
Eina_Bool enabled = _edi_project_config->gui.translucent; Eina_Bool enabled = _edi_project_config->gui.translucent;
int r, g, b, a;
win = edi_main_win_get(); win = edi_main_win_get();
@ -35,12 +34,12 @@ edi_theme_window_alpha_set(void)
bg = evas_object_data_get(win, "background"); bg = evas_object_data_get(win, "background");
efl_gfx_color_get(efl_part(mainbox, "background"), &r, &g, &b, &a); double fade = (100.0 / 255 *_edi_project_config->gui.alpha) / 100.0;
if (enabled) if (enabled)
efl_gfx_color_set(bg, r, g, b, _edi_project_config->gui.alpha); efl_gfx_color_set(bg, 100 * fade, 100 * fade, 100 * fade, fade * _edi_project_config->gui.alpha);
else else
efl_gfx_color_set(bg, r, g, b, 255); efl_gfx_color_set(bg, 100, 100, 100, 128);
} }
void edi_theme_elm_code_alpha_set(Evas_Object *obj) void edi_theme_elm_code_alpha_set(Evas_Object *obj)