forked from enlightenment/efl
From: Kim Shinwoo <kimcinoo.efl@gmail.com>
Subject: [E-devel] [patch][elementary] popup - smart theme popup have used notify its internal widget. but popup does not take care the notify theme in its smart_theme() the attachment just add a line to set style to the notify and test code also. please review and give feedback. thanks. SVN revision: 75987
This commit is contained in:
parent
3694f65c8d
commit
fc2222be84
|
@ -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.
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue