diff --git a/data/themes/default_dialog.edc b/data/themes/default_dialog.edc index a1ab6323e..8e8539853 100644 --- a/data/themes/default_dialog.edc +++ b/data/themes/default_dialog.edc @@ -453,6 +453,158 @@ group { } } } + part { + name: "glint_clip"; + type: RECT; + mouse_events: 0; + description { + state: "default" 0.0; + color: 255 255 255 255; + rel1 { + relative: 0.0 0.0; + offset: 3 3; + } + rel2 { + relative: 1.0 1.0; + offset: -4 -4; + } + } + } + part { + name: "glint1"; + mouse_events: 0; + description { + state: "default" 0.0; + visible: 0; + color: 255 255 255 0; + align: 0.0 0.0; + max: 34 13; + rel1 { + relative: 0.0 0.0; + offset: 2 2; + } + rel2 { + relative: 1.0 1.0; + offset: -3 -3; + } + image { + normal: "e17_titlebar_glint1.png"; + border: 5 0 5 0; + } + fill { + smooth: 0; + } + } + description { + state: "active" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + } + part { + name: "glint2"; + mouse_events: 0; + clip_to: "glint_clip"; + description { + state: "default" 0.0; + visible: 0; + color: 255 255 255 0; + align: 1.0 0.5; + max: 0 0; + rel1 { + relative: 0.0 0.0; + offset: 3 3; + } + rel2 { + relative: 0.0 1.0; + offset: 3 -4; + } + image { + normal: "e17_titlebar_glint2.png"; + border: 0 0 5 5; + } + fill { + smooth: 0; + } + } + description { + state: "active" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + max: 169 9999; + min: 169 8; + align: 0.5 0.5; + } + description { + state: "active2" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 128; + max: 169 9999; + min: 169 8; + align: 0.5 0.5; + rel1 { + relative: 1.0 0.0; + offset: -4 3; + } + rel2 { + relative: 1.0 1.0; + offset: -4 -4; + } + } + description { + state: "active3" 0.0; + inherit: "default" 0.0; + visible: 0; + color: 255 255 255 0; + max: 169 9999; + min: 169 8; + align: 0.0 0.5; + rel1 { + relative: 1.0 0.0; + offset: -4 3; + } + rel2 { + relative: 1.0 1.0; + offset: -4 -4; + } + } + } + part { + name: "glint3"; + mouse_events: 0; + description { + state: "default" 0.0; + visible: 0; + color: 255 255 255 0; + align: 1.0 1.0; + max: 34 13; + rel1 { + relative: 0.0 0.0; + offset: 2 2; + } + rel2 { + relative: 1.0 1.0; + offset: -3 -3; + } + image { + normal: "e17_titlebar_glint3.png"; + border: 0 5 0 5; + } + fill { + smooth: 0; + } + } + description { + state: "active" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + } + FOCUS_RECT(0.0, 0.0, 1.0, 1.0, 7, 7, -8, -8) } programs { @@ -483,6 +635,57 @@ group { action: STATE_SET "visible" 0.0; target: "icon_swallow"; } + program { + name: "button_enter"; + signal: "enter"; + source: ""; + script { + run_program(PROGRAM:"go_active"); + } + } + program { + name: "go_active"; + action: STATE_SET "active" 0.0; + target: "glint1"; + target: "glint2"; + transition: LINEAR 0.05; + after: "go_active2"; + after: "go_active2b"; + } + program { + name: "go_active2"; + action: STATE_SET "active2" 0.0; + target: "glint2"; + transition: LINEAR 0.2; + after: "go_active3"; + after: "go_active3b"; + } + program { + name: "go_active2b"; + action: STATE_SET "active" 0.0; + target: "glint3"; + transition: LINEAR 0.2; + } + program { + name: "go_active3"; + action: STATE_SET "active3" 0.0; + target: "glint2"; + transition: LINEAR 0.05; + } + program { + name: "go_active3b"; + action: STATE_SET "default" 0.0; + target: "glint3"; + transition: LINEAR 0.1; + after: "go_active4"; + } + program { + name: "go_active4"; + action: STATE_SET "default" 0.0; + target: "glint1"; + target: "glint2"; + target: "glint3"; + } program { name: "button_focus"; signal: "focus"; diff --git a/src/bin/e_dialog.c b/src/bin/e_dialog.c index 76e308878..f84f74efc 100644 --- a/src/bin/e_dialog.c +++ b/src/bin/e_dialog.c @@ -18,9 +18,11 @@ struct _E_Dialog_Button /* local subsystem functions */ static void _e_dialog_free(E_Dialog *dia); static void _e_dialog_cb_button_clicked(void *data, Evas_Object *obj, const char *emission, const char *source); +static void _e_dialog_button_cb_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event); static void _e_dialog_cb_delete(E_Win *win); static void _e_dialog_cb_key_down(void *data, Evas *e, Evas_Object *obj, void *event); + /* local subsystem globals */ /* externally accessible functions */ @@ -111,6 +113,9 @@ e_dialog_button_add(E_Dialog *dia, char *label, char *icon, void (*func) (void * edje_object_signal_callback_add(db->obj, "click", "", _e_dialog_cb_button_clicked, db); edje_object_part_text_set(db->obj, "button_text", db->label); + + evas_object_event_callback_add(db->obj, EVAS_CALLBACK_MOUSE_IN, _e_dialog_button_cb_mouse_in, dia); + if (icon) { db->obj_icon = edje_object_add(e_win_evas_get(dia->win)); @@ -245,6 +250,12 @@ _e_dialog_cb_button_clicked(void *data, Evas_Object *obj, const char *emission, e_object_del(E_OBJECT(db->dialog)); } +static void +_e_dialog_button_cb_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event) +{ + edje_object_signal_emit(obj, "enter", ""); +} + /* TODO: Implement shift-tab and left arrow */ static void _e_dialog_cb_key_down(void *data, Evas *e, Evas_Object *obj, void *event) @@ -262,7 +273,7 @@ _e_dialog_cb_key_down(void *data, Evas *e, Evas_Object *obj, void *event) E_Dialog_Button *db; db = dia->focused->data; - edje_object_signal_emit(db->obj, "unfocus", ""); + edje_object_signal_emit(db->obj, "unfocus", ""); if (evas_key_modifier_is_set(evas_key_modifier_get(e_win_evas_get(dia->win)), "Shift")) { if (dia->focused->prev) dia->focused = dia->focused->prev; @@ -275,6 +286,8 @@ _e_dialog_cb_key_down(void *data, Evas *e, Evas_Object *obj, void *event) } db = evas_list_data(dia->focused); edje_object_signal_emit(db->obj, "focus", ""); + edje_object_signal_emit(db->obj, "enter", ""); + } else { @@ -284,6 +297,7 @@ _e_dialog_cb_key_down(void *data, Evas *e, Evas_Object *obj, void *event) db = dia->focused->data; edje_object_signal_emit(db->obj, "focus", ""); + edje_object_signal_emit(db->obj, "enter", ""); } } else if (((!strcmp(ev->keyname, "Return")) || diff --git a/src/bin/e_entry.c b/src/bin/e_entry.c index 99f6bf04b..0f3ec7260 100644 --- a/src/bin/e_entry.c +++ b/src/bin/e_entry.c @@ -661,7 +661,9 @@ static void _e_editable_text_smart_add(Evas_Object *object) evas_object_smart_data_set(object, editable_text_sd); cursor = (Evas_Textblock_Cursor *)evas_object_textblock2_cursor_get(editable_text_sd->text_object); - evas_textblock2_cursor_node_first(cursor); + evas_textblock2_cursor_node_first(cursor); + + evas_font_path_append (evas, PACKAGE_DATA_DIR"/data/fonts"); } /* Called when the object is deleted */