aboutsummaryrefslogtreecommitdiffstats
path: root/examples/elementary
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2016-01-23 16:32:08 +0100
committerDave Andreoli <dave@gurumeditation.it>2016-01-23 16:32:08 +0100
commit190d0aa7b635682dc5ce1f83cab28006eb8fc27e (patch)
tree23da36d9151a23c0dca7c952f41f29a11f75935c /examples/elementary
parentNew 1.17 API: elm.Configuration.profile_* family functions (diff)
downloadpython-efl-190d0aa7b635682dc5ce1f83cab28006eb8fc27e.tar.gz
New 1.17 API: elm.Popup.dismiss()
Diffstat (limited to 'examples/elementary')
-rw-r--r--examples/elementary/test_popup.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/examples/elementary/test_popup.py b/examples/elementary/test_popup.py
index a00e5f4..c938151 100644
--- a/examples/elementary/test_popup.py
+++ b/examples/elementary/test_popup.py
@@ -168,8 +168,27 @@ def cb_popup_center_text_1button_hide_show(li, item, win):
g_popup.show()
+def _popup_dismissed_cb(popup):
+ print("dismissed", popup)
+ popup.delete()
+
+def cb_popup_center_title_1button_hide_effect(li, item, win):
+ popup = Popup(win, text="This Popup has title area, content area and " \
+ "action area set, action area has one button Close",
+ size_hint_expand=EXPAND_BOTH)
+ popup.part_text_set("title", "Title")
+ popup.callback_dismissed_add(_popup_dismissed_cb)
+
+ btn = Button(popup, text="Close")
+ btn.callback_clicked_add(lambda b: popup.dismiss())
+ popup.part_content_set("button1", btn)
+
+ popup.show()
+
+
+
def popup_clicked(obj):
- win = StandardWindow("popup", "Popup test", autodel=True, size=(480, 800))
+ win = StandardWindow("popup", "Popup test", autodel=True, size=(400, 400))
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
@@ -196,6 +215,8 @@ def popup_clicked(obj):
cb_popup_center_title_text_2button_restack, win)
li.item_append("popup-center-text + 1 button (check hide, show)", None, None,
cb_popup_center_text_1button_hide_show, win)
+ li.item_append("popup-center-title + text + 1 button + hide effect", None, None,
+ cb_popup_center_title_1button_hide_effect, win)
li.go()