forked from enlightenment/efl
From: 김지훈 <jihoon48.kim@samsung.com>
I send the elm_notify patch for showing in the center of screen. This patch is developerd by Hee Seo. <---> Looks good. simple. straighforward. into svn it goes! SVN revision: 45320
This commit is contained in:
parent
b400d33dfd
commit
6fdc31d541
|
@ -7163,6 +7163,61 @@ collections {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
group { name: "elm/notify/base/center";
|
||||||
|
//this group is a design similar to the inwin group
|
||||||
|
images {
|
||||||
|
image: "bt_dis_base.png" COMP;
|
||||||
|
}
|
||||||
|
parts {
|
||||||
|
part { name: "base";
|
||||||
|
type: RECT;
|
||||||
|
mouse_events: 0;
|
||||||
|
repeat_events: 1;
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
color: 0 0 0 0;
|
||||||
|
rel1.relative: 0.0 0.0;
|
||||||
|
rel2.relative: 1.0 1.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part { name: "pop";
|
||||||
|
mouse_events: 1;
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
rel1.to: "elm.swallow.content";
|
||||||
|
rel2.to: "elm.swallow.content";
|
||||||
|
image {
|
||||||
|
normal: "bt_dis_base.png";
|
||||||
|
border: 4 4 4 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part { name: "elm.swallow.content";
|
||||||
|
type: SWALLOW;
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
rel1.to: "base";
|
||||||
|
rel2.to: "base";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
programs {
|
||||||
|
program { name: "show";
|
||||||
|
signal: "elm,action,show";
|
||||||
|
source: "elm";
|
||||||
|
action: STATE_SET "default" 0.0;
|
||||||
|
target: "base";
|
||||||
|
}
|
||||||
|
program { name: "show_2";
|
||||||
|
signal: "show";
|
||||||
|
action: STATE_SET "default" 0.0;
|
||||||
|
target: "base";
|
||||||
|
}
|
||||||
|
program { name: "hide";
|
||||||
|
signal: "elm,action,hide";
|
||||||
|
source: "elm";
|
||||||
|
action: STATE_SET "default" 0.0;
|
||||||
|
target: "base";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
group { name: "elm/notify/base/bottom";
|
group { name: "elm/notify/base/bottom";
|
||||||
//this group is a design similar to the inwin group
|
//this group is a design similar to the inwin group
|
||||||
images {
|
images {
|
||||||
|
|
|
@ -118,6 +118,33 @@ test_notify(void *data, Evas_Object *obj, void *event_info)
|
||||||
elm_table_pack(tb, bt, 0, 1, 1, 1);
|
elm_table_pack(tb, bt, 0, 1, 1, 1);
|
||||||
evas_object_show(bt);
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
notify = elm_notify_add(win);
|
||||||
|
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_CENTER);
|
||||||
|
elm_notify_timeout_set(notify, 10);
|
||||||
|
|
||||||
|
bx = elm_box_add(win);
|
||||||
|
elm_notify_content_set(notify, bx);
|
||||||
|
elm_box_horizontal_set(bx, 1);
|
||||||
|
evas_object_show(bx);
|
||||||
|
|
||||||
|
lb = elm_label_add(win);
|
||||||
|
elm_label_label_set(lb, "Center position. This notify use a timeout of 10 sec.");
|
||||||
|
elm_box_pack_end(bx, lb);
|
||||||
|
evas_object_show(lb);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_button_label_set(bt, "Close");
|
||||||
|
evas_object_smart_callback_add(bt, "clicked", _bt_close, notify);
|
||||||
|
elm_box_pack_end(bx, bt);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
|
bt = elm_button_add(win);
|
||||||
|
elm_button_label_set(bt, "Center");
|
||||||
|
evas_object_smart_callback_add(bt, "clicked", _bt, notify);
|
||||||
|
elm_table_pack(tb, bt, 1, 1, 1, 1);
|
||||||
|
evas_object_show(bt);
|
||||||
|
|
||||||
notify = elm_notify_add(win);
|
notify = elm_notify_add(win);
|
||||||
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_RIGHT);
|
elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_RIGHT);
|
||||||
|
|
|
@ -482,6 +482,7 @@ extern "C" {
|
||||||
typedef enum _Elm_Notify_Orient
|
typedef enum _Elm_Notify_Orient
|
||||||
{
|
{
|
||||||
ELM_NOTIFY_ORIENT_TOP,
|
ELM_NOTIFY_ORIENT_TOP,
|
||||||
|
ELM_NOTIFY_ORIENT_CENTER,
|
||||||
ELM_NOTIFY_ORIENT_BOTTOM,
|
ELM_NOTIFY_ORIENT_BOTTOM,
|
||||||
ELM_NOTIFY_ORIENT_LEFT,
|
ELM_NOTIFY_ORIENT_LEFT,
|
||||||
ELM_NOTIFY_ORIENT_RIGHT,
|
ELM_NOTIFY_ORIENT_RIGHT,
|
||||||
|
|
|
@ -136,6 +136,9 @@ _calc(Evas_Object *obj)
|
||||||
case ELM_NOTIFY_ORIENT_TOP:
|
case ELM_NOTIFY_ORIENT_TOP:
|
||||||
evas_object_move(wd->notify, x + offx, y);
|
evas_object_move(wd->notify, x + offx, y);
|
||||||
break;
|
break;
|
||||||
|
case ELM_NOTIFY_ORIENT_CENTER:
|
||||||
|
evas_object_move(wd->notify, x + offx, y + offy);
|
||||||
|
break;
|
||||||
case ELM_NOTIFY_ORIENT_BOTTOM:
|
case ELM_NOTIFY_ORIENT_BOTTOM:
|
||||||
evas_object_move(wd->notify, x + offx, y + h - minh);
|
evas_object_move(wd->notify, x + offx, y + h - minh);
|
||||||
break;
|
break;
|
||||||
|
@ -371,6 +374,9 @@ elm_notify_orient_set(Evas_Object *obj, Elm_Notify_Orient orient)
|
||||||
case ELM_NOTIFY_ORIENT_TOP:
|
case ELM_NOTIFY_ORIENT_TOP:
|
||||||
_elm_theme_set(wd->notify, "notify", "base", "default");
|
_elm_theme_set(wd->notify, "notify", "base", "default");
|
||||||
break;
|
break;
|
||||||
|
case ELM_NOTIFY_ORIENT_CENTER:
|
||||||
|
_elm_theme_set(wd->notify, "notify", "base", "center");
|
||||||
|
break;
|
||||||
case ELM_NOTIFY_ORIENT_BOTTOM:
|
case ELM_NOTIFY_ORIENT_BOTTOM:
|
||||||
_elm_theme_set(wd->notify, "notify", "base", "bottom");
|
_elm_theme_set(wd->notify, "notify", "base", "bottom");
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue