diff --git a/legacy/elementary/data/themes/Makefile.am b/legacy/elementary/data/themes/Makefile.am index 31985a75d6..60aad9ae2e 100644 --- a/legacy/elementary/data/themes/Makefile.am +++ b/legacy/elementary/data/themes/Makefile.am @@ -55,6 +55,7 @@ flip_base_shad.png \ flip_pmb.png \ flip_pmt.png \ flip_shad.png \ +head.png \ sb_runnerh.png \ sb_runnerv.png \ shelf_inset.png \ diff --git a/legacy/elementary/data/themes/default.edc b/legacy/elementary/data/themes/default.edc index 7c3563c1f0..53ba3a6261 100644 --- a/legacy/elementary/data/themes/default.edc +++ b/legacy/elementary/data/themes/default.edc @@ -3644,6 +3644,75 @@ collections { } } +/////////////////////////////////////////////////////////////////////////////// + group { name: "elm/photo/base/default"; + images { + image: "frame_1.png" COMP; + image: "frame_2.png" COMP; + image: "dia_grad.png" COMP; + image: "head.png" COMP; + } + parts { + part { name: "base0"; + mouse_events: 0; + description { state: "default" 0.0; + image.normal: "dia_grad.png"; + rel1.to: "over"; + rel2.to: "over"; + fill { + smooth: 0; + size { + relative: 0.0 1.0; + offset: 64 0; + } + } + } + } + part { name: "base"; + mouse_events: 0; + description { state: "default" 0.0; + image { + normal: "frame_2.png"; + border: 5 5 32 26; + middle: 0; + } + fill.smooth : 0; + } + } + part { name: "head"; + mouse_events: 0; + description { state: "default" 0.0; + rel1.offset: 4 4; + rel2.offset: -5 -5; + aspect: 1.0 1.0; + aspect_preference: BOTH; + image.normal: "head.png"; + fill.smooth: 0; + } + } + part { name: "elm.swallow.content"; + type: SWALLOW; + description { state: "default" 0.0; + rel1.offset: 4 4; + rel2.offset: -5 -5; + } + } + part { name: "over"; + mouse_events: 0; + description { state: "default" 0.0; + rel1.offset: 4 4; + rel2.offset: -5 -5; + image { + normal: "frame_1.png"; + border: 2 2 28 22; + middle: 0; + } + fill.smooth: 0; + } + } + } + } + /////////////////////////////////////////////////////////////////////////////// group { name: "elm/icon/home/default"; min: 32 32; images.image: "icon_home.png" COMP; parts { part { name: "base"; diff --git a/legacy/elementary/data/themes/head.png b/legacy/elementary/data/themes/head.png new file mode 100644 index 0000000000..905b92c97f Binary files /dev/null and b/legacy/elementary/data/themes/head.png differ diff --git a/legacy/elementary/src/lib/Elementary.h b/legacy/elementary/src/lib/Elementary.h index 22b359254f..d99838b4b8 100644 --- a/legacy/elementary/src/lib/Elementary.h +++ b/legacy/elementary/src/lib/Elementary.h @@ -305,9 +305,17 @@ extern "C" { EAPI void elm_bubble_info_set(Evas_Object *obj, const char *info); EAPI void elm_bubble_content_set(Evas_Object *obj, Evas_Object *content); EAPI void elm_bubble_icon_set(Evas_Object *obj, Evas_Object *icon); + EAPI void elm_bubble_corner_set(Evas_Object *obj, const char *corner); /* smart callbacks called: */ + EAPI Evas_Object *elm_photo_add(Evas_Object *parent); + EAPI void elm_photo_file_set(Evas_Object *obj, const char *file); + EAPI void elm_photo_size_set(Evas_Object *obj, int size); + /* smart callbacks called: + * "clicked" - the user clicked the icon + */ + //////////////////////////////////////////////////////////////////////////// /// FIXME: TODO LIST /////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// @@ -320,7 +328,6 @@ extern "C" { // * bubble doesnt handle child size changes right // //// (incomplete - medium priority) -// * bubble should allow style (left/right + top/bottom) // * buttons need a "bigbutton" option // * disabled not supported // * tab widget focusing (not useful for touchscreen tho...) diff --git a/legacy/elementary/src/lib/Makefile.am b/legacy/elementary/src/lib/Makefile.am index 768c139ea1..e5265b521e 100644 --- a/legacy/elementary/src/lib/Makefile.am +++ b/legacy/elementary/src/lib/Makefile.am @@ -34,6 +34,7 @@ elm_layout.c \ elm_hover.c \ elm_entry.c \ elm_bubble.c \ +elm_photo.c \ elm_contact.c \ elm_contactlist.c \ \ diff --git a/legacy/elementary/src/lib/elm_bubble.c b/legacy/elementary/src/lib/elm_bubble.c index 54ae54b4fb..6477dd0157 100644 --- a/legacy/elementary/src/lib/elm_bubble.c +++ b/legacy/elementary/src/lib/elm_bubble.c @@ -157,3 +157,17 @@ elm_bubble_icon_set(Evas_Object *obj, Evas_Object *icon) _sizing_eval(obj); } } + +EAPI void +elm_bubble_corner_set(Evas_Object *obj, const char *corner) +{ + Widget_Data *wd = elm_widget_data_get(obj); + + _elm_theme_set(wd->bbl, "bubble", corner, "default"); + if (wd->icon) + edje_object_part_swallow(wd->bbl, "elm.swallow.icon", wd->icon); + if (wd->content) + edje_object_part_swallow(wd->bbl, "elm.swallow.content", wd->content); + // FIXME: fix label etc. + _sizing_eval(obj); +}