diff --git a/legacy/elementary/ChangeLog b/legacy/elementary/ChangeLog index f7228a8cd2..2f532cc1ce 100644 --- a/legacy/elementary/ChangeLog +++ b/legacy/elementary/ChangeLog @@ -446,3 +446,4 @@ 2012-09-03 Shinwoo Kim (kimcinoo) * Add in more access subsystem features like activation cb. + * Fix popup to apply the same style to the notify sub-widget. diff --git a/legacy/elementary/NEWS b/legacy/elementary/NEWS index 5702ee0b0c..3b533f0f6c 100644 --- a/legacy/elementary/NEWS +++ b/legacy/elementary/NEWS @@ -16,6 +16,7 @@ Fixes: * Now elm_datetime_field_limit_set() can set year limits wihtout problems. * Fix re-order animation when it doesn't end correctly. + * Fix popup to apply the same style to the notify sub-widget. Removals: diff --git a/legacy/elementary/data/themes/widgets/popup.edc b/legacy/elementary/data/themes/widgets/popup.edc index aca9f9d467..2bb382a9fb 100644 --- a/legacy/elementary/data/themes/widgets/popup.edc +++ b/legacy/elementary/data/themes/widgets/popup.edc @@ -20,6 +20,41 @@ group { name: "elm/notify/block_events/popup"; } } +group { name: "elm/notify/block_events/transparent"; + parts { + part { name: "block_events"; + type: RECT; + description { state: "default" 0.0; + color: 0 0 0 0; + } + description { state: "clicked" 0.0; + color: 0 0 0 50; + } + } + } + programs { + program { name: "block_clicked"; + signal: "mouse,clicked,1"; + source: "block_events"; + action: SIGNAL_EMIT "elm,action,click" "elm"; + after: "deeper_block_color"; + } + program { + name: "deeper_block_color"; + action: STATE_SET "clicked" 0.0; + target: "block_events"; + transition: LINEAR 0.2; + after: "default_block_color"; + } + program { + name: "default_block_color"; + action: STATE_SET "default" 0.0; + target: "block_events"; + transition: LINEAR 0.2; + } + } +} + group { name: "elm/label/base/popup/default"; styles { diff --git a/legacy/elementary/src/bin/test_popup.c b/legacy/elementary/src/bin/test_popup.c index 0c68316d21..f5be1b8fe0 100644 --- a/legacy/elementary/src/bin/test_popup.c +++ b/legacy/elementary/src/bin/test_popup.c @@ -305,6 +305,24 @@ _popup_center_text_1button_hide_show_cb(void *data, Evas_Object *obj __UNUSED__, evas_object_show(g_popup); } +static void +_popup_transparent_cb(void *data, Evas_Object *obj __UNUSED__, + void *event_info __UNUSED__) +{ + Evas_Object *popup; + Evas_Object *btn; + + popup = elm_popup_add(data); + elm_object_style_set(popup, "transparent"); + evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_object_text_set(popup, "This Popup has transparent background"); + btn = elm_button_add(popup); + elm_object_text_set(btn, "Close"); + elm_object_part_content_set(popup, "button1", btn); + evas_object_smart_callback_add(btn, "clicked", _response_cb, popup); + evas_object_show(popup); +} + void test_popup(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) @@ -341,6 +359,8 @@ test_popup(void *data __UNUSED__, Evas_Object *obj __UNUSED__, _popup_center_title_text_2button_restack_cb, win); elm_list_item_append(list, "popup-center-text + 1 button (check hide, show)", NULL, NULL, _popup_center_text_1button_hide_show_cb, win); + elm_list_item_append(list, "popup-transparent", NULL, NULL, + _popup_transparent_cb, win); elm_list_go(list); evas_object_show(list); evas_object_show(win); diff --git a/legacy/elementary/src/lib/elc_popup.c b/legacy/elementary/src/lib/elc_popup.c index 3de0781b6b..1a49e55d32 100644 --- a/legacy/elementary/src/lib/elc_popup.c +++ b/legacy/elementary/src/lib/elc_popup.c @@ -220,6 +220,8 @@ _elm_popup_smart_theme(Evas_Object *obj) _mirrored_set(obj, elm_widget_mirrored_get(obj)); + elm_object_style_set(sd->notify, elm_widget_style_get(obj)); + if (sd->button_count) { snprintf(buf, sizeof(buf), "buttons%u", sd->button_count);