forked from enlightenment/edi
Fix transparancy
This commit is contained in:
parent
4095c75438
commit
e7373855d9
|
@ -16,7 +16,7 @@ void
|
||||||
edi_theme_window_alpha_set(void)
|
edi_theme_window_alpha_set(void)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *mainbox;
|
Evas_Object *win, *bg, *mainbox;
|
||||||
int r, g, b, a;
|
static int r = 0, g = 0, b = 0, a = 0;
|
||||||
double fade;
|
double fade;
|
||||||
Eina_Bool enabled = _edi_project_config->gui.translucent;
|
Eina_Bool enabled = _edi_project_config->gui.translucent;
|
||||||
|
|
||||||
|
@ -34,13 +34,20 @@ edi_theme_window_alpha_set(void)
|
||||||
|
|
||||||
fade = _edi_project_config->gui.alpha / 255.0;
|
fade = _edi_project_config->gui.alpha / 255.0;
|
||||||
|
|
||||||
|
if (r == 0 && g == 0 && b == 0 && a == 0)
|
||||||
efl_gfx_color_get(efl_part(win, "background"), &r, &g, &b, &a);
|
efl_gfx_color_get(efl_part(win, "background"), &r, &g, &b, &a);
|
||||||
|
|
||||||
if (enabled)
|
if (enabled)
|
||||||
|
{
|
||||||
|
efl_gfx_color_set(efl_part(win, "background"), r, g, b, 0);
|
||||||
efl_gfx_color_set(bg, r * fade, g * fade, b * fade, fade * _edi_project_config->gui.alpha);
|
efl_gfx_color_set(bg, r * fade, g * fade, b * fade, fade * _edi_project_config->gui.alpha);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
efl_gfx_color_set(efl_part(win, "background"), r, g, b, 255);
|
||||||
efl_gfx_color_set(bg, r, g, b, 128);
|
efl_gfx_color_set(bg, r, g, b, 128);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void edi_theme_elm_code_alpha_set(Evas_Object *obj)
|
void edi_theme_elm_code_alpha_set(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue