#include "../../include/defs.h"
group {
name, GRP_BAR_ITEM;
+ images {
+ image, "mask_user_nor.png" COMP;
+ }
+ script {
+ public mask_on;
+ }
parts {
part {
name, "bg";
rel2.to, PART_BAR_ITEM_ICON;
}
}
+ part {
+ name, "mask";
+ type, IMAGE;
+ scale, 1;
+ description {
+ state, "default" 0.0;
+ rel1.to, PART_BAR_ITEM_ICON;
+ rel2.to, PART_BAR_ITEM_ICON;
+ image.normal, "mask_user_nor.png";
+ visible, 0;
+ }
+ description {
+ state, "show" 0.0;
+ inherit, "default" 0.0;
+ visible, 1;
+ }
+ }
+ part {
+ name, "mask_focus";
+ type, IMAGE;
+ scale, 1;
+ clip_to, "clip";
+ description {
+ state, "default" 0.0;
+ image.normal, "mask_user_nor.png";
+ color, 0 119 245 255;
+ rel1.to, PART_BAR_ITEM_ICON;
+ rel2.to, PART_BAR_ITEM_ICON;
+ visible, 0;
+ }
+ description {
+ state, "show" 0.0;
+ inherit, "default" 0.0;
+ visible, 1;
+ }
+ }
}
programs {
program {
target, "clip";
after, "sig,focus";
}
+ program {
+ name, "sig,show,mask";
+ signal, SIG_SHOW_MASK;
+ source, SRC_PROG;
+ script {
+ set_int(mask_on, 1);
+ }
+ after, "sig,show,mask,after";
+ }
+ program {
+ name, "sig,show,mask,after";
+ source, SRC_PROG;
+ action, STATE_SET "show" 0.0;
+ target, "mask";
+ }
+ program {
+ name, "sig,focus,mask";
+ signal, SIG_FOCUS;
+ source, SRC_PROG;
+ script {
+ if (get_int(mask_on) == 1)
+ set_state(PART:"mask_focus", "show", 0.0);
+ }
+ }
}
}
#define SIG_HIDE_RECENT "sig.hide.recent"
#define SIG_HIDE_RECENT_DONE "sig.hide.recent.done"
#define SIG_DISABLE "sig.disable"
+#define SIG_SHOW_MASK "sig.show.mask"
#define TITLE_WIDTH "title.width"
#include "data_user.h"
#include "datamgr.h"
#include "defs.h"
+#include "utils.h"
#define GUM_ATTR_NAME "username"
#define GUM_ATTR_USERTYPE "usertype"
icon = NULL;
g_object_get(G_OBJECT(user), GUM_ATTR_NAME, &name, GUM_ATTR_ICON, &icon,
GUM_ATTR_USERTYPE, &type, NULL);
- di = _pack_user(name, icon, icon, ITEM_SELECT_ACTION_POP, NULL, type);
+ di = _pack_user(name, icon,
+ (char *)utils_get_focus_icon_from_icon(icon),
+ ITEM_SELECT_ACTION_POP, NULL, type);
if (!di) {
g_object_unref(user);
return false;
if (uid == user_uid)
continue;
- di = _pack_user(name, icon, icon, ITEM_SELECT_ACTION_SWITCH,
- NULL, type);
+ di = _pack_user(name, icon,
+ (char *)utils_get_focus_icon_from_icon(icon),
+ ITEM_SELECT_ACTION_SWITCH, NULL, type);
if (!di)
continue;
if (!ic)
goto err;
- focus_ic = utils_add_icon(eo,
- utils_get_focus_icon_from_icon(di->focus_icon),
+ focus_ic = utils_add_icon(eo, di->focus_icon,
PART_BAR_ITEM_ICON_FOCUS);
if (!focus_ic)
goto err;
+ if (!strcmp(di->icon, di->focus_icon))
+ elm_object_signal_emit(eo, SIG_SHOW_MASK, SRC_PROG);
+
bg = utils_add_bg(eo, COLOR_DEFAULT_R, COLOR_DEFAULT_G, COLOR_DEFAULT_B,
COLOR_DEFAULT_A, PART_BAR_ITEM_BG);
if (!bg)