forked from enlightenment/enlightenment
... improve that popup box from ibar to not scale all over the place... but.. comp mirrors are full of garbage for me.
This commit is contained in:
parent
2babd46029
commit
5548e4afa7
|
@ -3,6 +3,7 @@ group { name: "e/modules/ibox/icon";
|
|||
// 1 or 0 if u want an icon holder to raise when the mouse (or keyboard) hilights it
|
||||
data.item: "raise_on_hilight" "0";
|
||||
// data.item: "item_list" "item item2 item3";
|
||||
images.image: "led_tiny_green.png" COMP;
|
||||
parts {
|
||||
part { name: "item_clip"; type: RECT;
|
||||
description { state: "default" 0.0;
|
||||
|
@ -34,15 +35,20 @@ group { name: "e/modules/ibox/icon";
|
|||
}
|
||||
part { name: "indicator";
|
||||
description { state: "default";
|
||||
rel1.offset: 5 2;
|
||||
image.normal: "led_light.png";
|
||||
aspect: 1.0 1.0; aspect_preference: BOTH;
|
||||
max: 32 32;
|
||||
color: 0 0 0 0;
|
||||
min: 10 10;
|
||||
max: 10 10;
|
||||
rel1.relative: 1.0 1.0;
|
||||
rel1.offset: -4 -4;
|
||||
rel2.relative: 1.0 1.0;
|
||||
rel2.offset: -3 -3;
|
||||
image.normal: "led_tiny_green.png";
|
||||
color: 255 255 255 0;
|
||||
visible: 0;
|
||||
}
|
||||
description { state: "visible" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
color: 255 255 255 200;
|
||||
color: 255 255 255 255;
|
||||
visible: 1;
|
||||
}
|
||||
}
|
||||
part { name: "over"; type: RECT;
|
||||
|
@ -80,17 +86,17 @@ group { name: "e/modules/ibox/icon";
|
|||
action: STATE_SET "default" 0.0;
|
||||
target: "item_clip";
|
||||
}
|
||||
program { name: "ion";
|
||||
program {
|
||||
signal: "e,state,on"; source: "e";
|
||||
action: STATE_SET "visible" 0.0;
|
||||
target: "indicator";
|
||||
transition: ACCELERATE 0.1;
|
||||
transition: ACCELERATE 0.2;
|
||||
}
|
||||
program { name: "ioff";
|
||||
program {
|
||||
signal: "e,state,off"; source: "e";
|
||||
action: STATE_SET "default" 0.0;
|
||||
target: "indicator";
|
||||
transition: DECELERATE 0.1;
|
||||
transition: DECELERATE 0.8;
|
||||
}
|
||||
program {
|
||||
signal: "e,state,urgent"; source: "e";
|
||||
|
@ -125,7 +131,8 @@ group { name: "e/modules/ibar/menu";
|
|||
description { state: "default";
|
||||
}
|
||||
description { state: "hidden";
|
||||
rel1.relative: 1 1;
|
||||
rel1.relative: 0.5 1.0;
|
||||
rel2.relative: 0.5 1.0;
|
||||
minmul: 0 0;
|
||||
}
|
||||
}
|
||||
|
@ -154,7 +161,7 @@ group { name: "e/modules/ibar/menu";
|
|||
rel1.to: "sizer";
|
||||
rel1.offset: 12 12;
|
||||
rel2.to: "sizer";
|
||||
rel2.offset: -12 -12;
|
||||
rel2.offset: -13 -13;
|
||||
box { layout: "vertical";
|
||||
padding: 0 0;
|
||||
align: 0.5 0.5;
|
||||
|
@ -191,43 +198,44 @@ group { name: "e/modules/ibar/menu";
|
|||
|
||||
group { name: "e/modules/ibar/menu/item";
|
||||
parts {
|
||||
part { name: "sizer"; type: SPACER;
|
||||
scale: 1;
|
||||
part { name: "icon"; type: SPACER;
|
||||
description { state: "default";
|
||||
}
|
||||
description { state: "focus";
|
||||
rel1.relative: -2 -2;
|
||||
rel2.relative: 2 2;
|
||||
rel1.offset: 2 2;
|
||||
rel2.offset: 2 -3;
|
||||
align: 0.0 0.5;
|
||||
aspect: 1.0 1.0; aspect_preference: BOTH;
|
||||
min: 48 48;
|
||||
max: 48 48;
|
||||
}
|
||||
}
|
||||
part { name: "e.swallow.icon"; type: SWALLOW; mouse_events: 0;
|
||||
clip_to: "icon_clip";
|
||||
description { state: "default";
|
||||
align: 0.0 0.5;
|
||||
aspect: 1.0 1.0;
|
||||
aspect_preference: BOTH;
|
||||
rel1.to: "sizer";
|
||||
rel2.to: "sizer";
|
||||
min: 32 32;
|
||||
rel1.to: "icon";
|
||||
rel2.to: "icon";
|
||||
}
|
||||
description { state: "focus";
|
||||
inherit: "default";
|
||||
rel1.offset: -2 -2;
|
||||
rel2.offset: 1 1;
|
||||
}
|
||||
}
|
||||
part { name: "e.text.title"; type: TEXT; mouse_events: 0;
|
||||
effect: SHADOW BOTTOM;
|
||||
scale: 1;
|
||||
description { state: "default" 0.0;
|
||||
rel1.to_x: "e.swallow.icon";
|
||||
rel1.to_x: "icon";
|
||||
rel1.relative: 1.0 0.0;
|
||||
rel1.offset: 4 0;
|
||||
rel1.to_y: "sizer";
|
||||
rel2.to: "sizer";
|
||||
rel2.offset: -1 -2;
|
||||
rel1.offset: 3 0;
|
||||
rel2.offset: -3 -3;
|
||||
color: 255 255 255 255;
|
||||
color3: 0 0 0 128;
|
||||
align: 0.0 0.0;
|
||||
color_class: "menu_item";
|
||||
min: 128 0;
|
||||
text { font: "Sans:style=Bold"; size: 10;
|
||||
text: "window name thingy";
|
||||
min: 1 1;
|
||||
min: 0 1;
|
||||
align: 0.0 0.5;
|
||||
text_class: "menu_item";
|
||||
}
|
||||
|
@ -249,9 +257,10 @@ group { name: "e/modules/ibar/menu/item";
|
|||
color2: 51 153 255 24;
|
||||
color3: 51 153 255 18;
|
||||
color_class: "menu_item_active";
|
||||
min: 128 0;
|
||||
text { font: "Sans:style=Bold"; size: 10;
|
||||
text_source: "e.text.title";
|
||||
min: 1 1;
|
||||
min: 0 1;
|
||||
align: 0.0 0.5;
|
||||
text_class: "menu_item";
|
||||
}
|
||||
|
@ -270,7 +279,7 @@ group { name: "e/modules/ibar/menu/item";
|
|||
}
|
||||
description { state: "focus";
|
||||
inherit: "default";
|
||||
color: 255 255 255 222;
|
||||
color: 255 255 255 200;
|
||||
}
|
||||
}
|
||||
part { name: "event"; type: RECT;
|
||||
|
@ -283,7 +292,7 @@ group { name: "e/modules/ibar/menu/item";
|
|||
program {
|
||||
signal: "mouse,in"; source: "event";
|
||||
action: STATE_SET "focus" 0.0;
|
||||
target: "sizer";
|
||||
target: "e.swallow.icon";
|
||||
target: "e.text.title";
|
||||
target: "title2";
|
||||
target: "icon_clip";
|
||||
|
@ -292,7 +301,7 @@ group { name: "e/modules/ibar/menu/item";
|
|||
program {
|
||||
signal: "mouse,out"; source: "event";
|
||||
action: STATE_SET "default" 0.0;
|
||||
target: "sizer";
|
||||
target: "e.swallow.icon";
|
||||
target: "e.text.title";
|
||||
target: "title2";
|
||||
target: "icon_clip";
|
||||
|
|
|
@ -901,7 +901,8 @@ _ibar_icon_menu(IBar_Icon *ic)
|
|||
E_OBJECT_DEL_SET(ic->menu, _ibar_cb_icon_menu_del);
|
||||
e = e_comp_get(ic->menu)->evas;
|
||||
o = edje_object_add(e);
|
||||
e_theme_edje_object_set(o, "base/theme/modules/ibar", "e/modules/ibar/menu");
|
||||
e_theme_edje_object_set(o, "base/theme/modules/ibar",
|
||||
"e/modules/ibar/menu");
|
||||
EINA_LIST_FOREACH(ic->exes, l, exe)
|
||||
{
|
||||
Evas_Object *img;
|
||||
|
@ -910,12 +911,15 @@ _ibar_icon_menu(IBar_Icon *ic)
|
|||
if (!exe->bd) continue; //WTF
|
||||
it = edje_object_add(e);
|
||||
e_popup_object_add(ic->menu->win, it);
|
||||
e_theme_edje_object_set(it, "base/theme/modules/ibar", "e/modules/ibar/menu/item");
|
||||
e_theme_edje_object_set(it, "base/theme/modules/ibar",
|
||||
"e/modules/ibar/menu/item");
|
||||
img = e_comp_win_image_mirror_add(exe->bd->cw);
|
||||
evas_object_event_callback_add(img, EVAS_CALLBACK_DEL, _ibar_cb_icon_menu_img_del, it);
|
||||
evas_object_event_callback_add(img, EVAS_CALLBACK_DEL,
|
||||
_ibar_cb_icon_menu_img_del, it);
|
||||
txt = exe->bd->client.netwm.name ?:
|
||||
(exe->bd->client.icccm.title ?: exe->bd->client.icccm.name);
|
||||
w = exe->bd->cw->pw, h = exe->bd->cw->ph;
|
||||
w = exe->bd->cw->pw;
|
||||
h = exe->bd->cw->ph;
|
||||
e_popup_object_add(ic->menu->win, img);
|
||||
evas_object_show(img);
|
||||
edje_extern_object_aspect_set(img, EDJE_ASPECT_CONTROL_BOTH, w, h);
|
||||
|
@ -924,6 +928,7 @@ _ibar_icon_menu(IBar_Icon *ic)
|
|||
edje_object_calc_force(it);
|
||||
edje_object_size_min_calc(it, &w, &h);
|
||||
edje_extern_object_min_size_set(it, w, h);
|
||||
evas_object_size_hint_min_set(it, w, h);
|
||||
evas_object_show(it);
|
||||
evas_object_event_callback_add(it, EVAS_CALLBACK_MOUSE_UP,
|
||||
_ibar_cb_icon_menu_mouse_up, exe->bd);
|
||||
|
@ -939,7 +944,8 @@ _ibar_icon_menu(IBar_Icon *ic)
|
|||
evas_object_del(ic->menu->o_bg);
|
||||
ic->menu->o_bg = o;
|
||||
ic->menu->w = w, ic->menu->h = h;
|
||||
edje_object_signal_callback_add(o, "e,action,hide,done", "*", _ibar_cb_icon_menu_hidden, ic);
|
||||
edje_object_signal_callback_add(o, "e,action,hide,done", "*",
|
||||
_ibar_cb_icon_menu_hidden, ic);
|
||||
e_popup_resize(ic->menu->win, w, h);
|
||||
edje_object_signal_emit(o, "e,state,hidden", "e");
|
||||
edje_object_message_signal_process(o);
|
||||
|
@ -1109,8 +1115,10 @@ _ibar_instance_watch(void *data, E_Exec_Instance *inst, E_Exec_Watch_Type type)
|
|||
{
|
||||
case E_EXEC_WATCH_STOPPED:
|
||||
case E_EXEC_WATCH_TIMEOUT:
|
||||
_ibar_icon_signal_emit(ic, "e,state,started", "e");
|
||||
ic->exes = eina_list_remove(ic->exes, inst);
|
||||
if (!ic->exes) _ibar_icon_signal_emit(ic, "e,state,off", "e");
|
||||
ic->exe_inst = NULL;
|
||||
break;
|
||||
case E_EXEC_WATCH_STARTED:
|
||||
_ibar_icon_signal_emit(ic, "e,state,started", "e");
|
||||
|
|
Loading…
Reference in New Issue