add support for setting window opacity
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
3101a2f410
commit
82ac30d8cb
|
@ -31,19 +31,17 @@ struct _Channel
|
||||||
static void
|
static void
|
||||||
_cb_theme_reload(Channel *chl)
|
_cb_theme_reload(Channel *chl)
|
||||||
{
|
{
|
||||||
if (chl->translucent == _ex_cfg->gui.translucent) return;
|
Edje_Message_Int msg;
|
||||||
|
|
||||||
chl->translucent = _ex_cfg->gui.translucent;
|
chl->translucent = _ex_cfg->gui.translucent;
|
||||||
|
|
||||||
if (chl->translucent)
|
if (chl->translucent)
|
||||||
{
|
msg.val = _ex_cfg->gui.opacity;
|
||||||
edje_object_signal_emit(chl->o_bg, "translucent,on", PACKAGE_NAME);
|
|
||||||
edje_object_signal_emit(chl->o_base, "translucent,on", PACKAGE_NAME);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
msg.val = 100;
|
||||||
edje_object_signal_emit(chl->o_bg, "translucent,off", PACKAGE_NAME);
|
|
||||||
edje_object_signal_emit(chl->o_base, "translucent,off", PACKAGE_NAME);
|
edje_object_message_send(chl->o_bg, EDJE_MESSAGE_INT, 1, &msg);
|
||||||
}
|
edje_object_message_send(chl->o_base, EDJE_MESSAGE_INT, 1, &msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -174,9 +172,9 @@ _channel_create(Evas *evas, const char *name)
|
||||||
chl->o_grid = _grid_add(evas);
|
chl->o_grid = _grid_add(evas);
|
||||||
WEIGHT_SET(chl->o_grid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
WEIGHT_SET(chl->o_grid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
FILL_SET(chl->o_grid, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
FILL_SET(chl->o_grid, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
evas_object_event_callback_add(chl->o_grid,
|
/* evas_object_event_callback_add(chl->o_grid, */
|
||||||
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
/* EVAS_CALLBACK_CHANGED_SIZE_HINTS, */
|
||||||
_cb_size_hint, chl);
|
/* _cb_size_hint, chl); */
|
||||||
evas_object_smart_callback_add(chl->o_grid, "options", _cb_options, chl);
|
evas_object_smart_callback_add(chl->o_grid, "options", _cb_options, chl);
|
||||||
evas_object_smart_callback_add(chl->o_grid, "prev", _cb_prev, chl);
|
evas_object_smart_callback_add(chl->o_grid, "prev", _cb_prev, chl);
|
||||||
evas_object_smart_callback_add(chl->o_grid, "next", _cb_next, chl);
|
evas_object_smart_callback_add(chl->o_grid, "next", _cb_next, chl);
|
||||||
|
|
|
@ -440,6 +440,17 @@ _window_update(void)
|
||||||
{
|
{
|
||||||
Eina_List *l = NULL;
|
Eina_List *l = NULL;
|
||||||
Channel *chl;
|
Channel *chl;
|
||||||
|
Edje_Message_Int msg;
|
||||||
|
|
||||||
|
if (!_win) return;
|
||||||
|
|
||||||
|
/* adjust opacity of window */
|
||||||
|
if (_ex_cfg->gui.translucent)
|
||||||
|
msg.val = _ex_cfg->gui.opacity;
|
||||||
|
else
|
||||||
|
msg.val = 100;
|
||||||
|
edje_object_message_send(_win->o_bg, EDJE_MESSAGE_INT, 1, &msg);
|
||||||
|
edje_object_message_send(_win->o_base, EDJE_MESSAGE_INT, 1, &msg);
|
||||||
|
|
||||||
/* set window alpha based on config */
|
/* set window alpha based on config */
|
||||||
elm_win_alpha_set(_win->o_win, _ex_cfg->gui.translucent);
|
elm_win_alpha_set(_win->o_win, _ex_cfg->gui.translucent);
|
||||||
|
|
Loading…
Reference in New Issue