forked from enlightenment/edi
Fix translucency again.
This commit is contained in:
parent
1c00bdb17f
commit
bd049d3dd8
|
@ -1521,6 +1521,7 @@ edi_open(const char *inputpath)
|
||||||
elm_win_resize_object_add(win, hbx);
|
elm_win_resize_object_add(win, hbx);
|
||||||
evas_object_show(hbx);
|
evas_object_show(hbx);
|
||||||
|
|
||||||
|
edi_theme_main_box_set(hbx);
|
||||||
edi_theme_window_alpha_set();
|
edi_theme_window_alpha_set();
|
||||||
|
|
||||||
tb = edi_toolbar_setup(hbx);
|
tb = edi_toolbar_setup(hbx);
|
||||||
|
|
|
@ -11,24 +11,46 @@
|
||||||
#include "edi_private.h"
|
#include "edi_private.h"
|
||||||
|
|
||||||
static Eina_List *_edi_themes = NULL;
|
static Eina_List *_edi_themes = NULL;
|
||||||
|
static Evas_Object *_main_box = NULL;
|
||||||
|
|
||||||
// we are hooking into Efl for now...
|
// we are hooking into Efl for now...
|
||||||
Efl_Ui_Theme_Apply efl_ui_widget_theme_apply(Eo *obj);
|
Efl_Ui_Theme_Apply efl_ui_widget_theme_apply(Eo *obj);
|
||||||
|
|
||||||
|
void
|
||||||
|
edi_theme_main_box_set(Evas_Object *box)
|
||||||
|
{
|
||||||
|
_main_box = box;
|
||||||
|
}
|
||||||
|
|
||||||
|
Evas_Object *
|
||||||
|
edi_theme_main_box_get(void)
|
||||||
|
{
|
||||||
|
return _main_box;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
edi_theme_window_alpha_set(void)
|
edi_theme_window_alpha_set(void)
|
||||||
{
|
{
|
||||||
Evas_Object *win;
|
Evas_Object *win;
|
||||||
|
Evas_Object *background;
|
||||||
|
static int r, g, b, a;
|
||||||
Eina_Bool enabled = _edi_project_config->gui.translucent;
|
Eina_Bool enabled = _edi_project_config->gui.translucent;
|
||||||
|
|
||||||
win = edi_main_win_get();
|
win = edi_main_win_get();
|
||||||
|
|
||||||
elm_win_alpha_set(win, enabled);
|
elm_win_alpha_set(win, enabled);
|
||||||
|
|
||||||
|
background = edi_theme_main_box_get();
|
||||||
|
if (!background)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!r && !g && !b && !a)
|
||||||
|
evas_object_color_get(background, &r, &g, &b, &a);
|
||||||
|
|
||||||
if (enabled)
|
if (enabled)
|
||||||
efl_gfx_color_set(efl_part(win, "background"), 64, 64, 64, _edi_project_config->gui.alpha);
|
evas_object_color_set(background, r, g, b, _edi_project_config->gui.alpha);
|
||||||
else
|
else
|
||||||
efl_gfx_color_set(efl_part(win, "background"), 64, 64, 64, 255);
|
evas_object_color_set(background, r, g, b, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
void edi_theme_elm_code_alpha_set(Evas_Object *obj)
|
void edi_theme_elm_code_alpha_set(Evas_Object *obj)
|
||||||
|
|
|
@ -59,6 +59,9 @@ Edi_Theme *edi_theme_theme_by_name(const char *name);
|
||||||
|
|
||||||
void edi_theme_window_alpha_set(void);
|
void edi_theme_window_alpha_set(void);
|
||||||
void edi_theme_elm_code_alpha_set(Evas_Object *obj);
|
void edi_theme_elm_code_alpha_set(Evas_Object *obj);
|
||||||
|
void edi_theme_main_box_set(Evas_Object *box);
|
||||||
|
Evas_Object *edi_theme_main_box_get(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue