From 005f01f8bcea765224793ece3c90d53176b19443 Mon Sep 17 00:00:00 2001 From: Alastair Poole Date: Wed, 1 Aug 2018 23:25:21 +0100 Subject: [PATCH] Revert "Fix translucency again." This reverts commit bd049d3dd84988af96b37f02efb769522513201c. --- src/bin/edi_main.c | 1 - src/bin/edi_theme.c | 28 +++------------------------- src/bin/edi_theme.h | 3 --- 3 files changed, 3 insertions(+), 29 deletions(-) diff --git a/src/bin/edi_main.c b/src/bin/edi_main.c index eea70c8..970edaa 100644 --- a/src/bin/edi_main.c +++ b/src/bin/edi_main.c @@ -1521,7 +1521,6 @@ edi_open(const char *inputpath) elm_win_resize_object_add(win, hbx); evas_object_show(hbx); - edi_theme_main_box_set(hbx); edi_theme_window_alpha_set(); tb = edi_toolbar_setup(hbx); diff --git a/src/bin/edi_theme.c b/src/bin/edi_theme.c index 7df0846..6bc3d05 100644 --- a/src/bin/edi_theme.c +++ b/src/bin/edi_theme.c @@ -11,51 +11,29 @@ #include "edi_private.h" static Eina_List *_edi_themes = NULL; -static Evas_Object *_main_box = NULL; // we are hooking into Efl for now... 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 edi_theme_window_alpha_set(void) { Evas_Object *win; - Evas_Object *background; - static int r, g, b, a; Eina_Bool enabled = _edi_project_config->gui.translucent; win = edi_main_win_get(); 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) - evas_object_color_set(background, r, g, b, _edi_project_config->gui.alpha); + efl_gfx_color_set(efl_part(win, "background"), 64, 64, 64, _edi_project_config->gui.alpha); else - evas_object_color_set(background, r, g, b, 255); + efl_gfx_color_set(efl_part(win, "background"), 64, 64, 64, 255); } void edi_theme_elm_code_alpha_set(Evas_Object *obj) { - if (_edi_project_config->gui.translucent) + if (_edi_project_config->gui.translucent) elm_code_widget_alpha_set(obj, _edi_project_config->gui.alpha); else elm_code_widget_alpha_set(obj, 255); diff --git a/src/bin/edi_theme.h b/src/bin/edi_theme.h index 63e9b98..d6d3992 100644 --- a/src/bin/edi_theme.h +++ b/src/bin/edi_theme.h @@ -59,9 +59,6 @@ Edi_Theme *edi_theme_theme_by_name(const char *name); void edi_theme_window_alpha_set(void); 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); - /** * @} */