aboutsummaryrefslogtreecommitdiffstats
path: root/examples/elementary/test_frame.py
diff options
context:
space:
mode:
authorDavide Andreoli <dave@gurumeditation.it>2013-03-01 21:01:50 +0000
committerDavide Andreoli <dave@gurumeditation.it>2013-03-01 21:01:50 +0000
commit0873fe162131bf672245e51d2670fc1ce822cfdd (patch)
tree4fa8667a51105ad846560dafe7e8fe64d935e616 /examples/elementary/test_frame.py
parentpython-efl: Skip build related code in setup.py when only generating (diff)
downloadpython-efl-0873fe162131bf672245e51d2670fc1ce822cfdd.tar.gz
Do not import EVERY widget while importing efl.elementary
Now the user is responsable of importing the widget used one by one, this should be a great speedup in the launch of the app. You have to import stuff in this way: from efl import evas from efl import elementary from efl.elementary.window import Window from efl.elementary.layout import Layout ...sorry for the inconvenience SVN revision: 84402
Diffstat (limited to 'examples/elementary/test_frame.py')
-rw-r--r--examples/elementary/test_frame.py21
1 files changed, 13 insertions, 8 deletions
diff --git a/examples/elementary/test_frame.py b/examples/elementary/test_frame.py
index 73131a0..6c5cccf 100644
--- a/examples/elementary/test_frame.py
+++ b/examples/elementary/test_frame.py
@@ -1,32 +1,37 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.frame import Frame
+from efl.elementary.icon import Icon
def frame_clicked(obj):
- win = elementary.Window("frame", elementary.ELM_WIN_BASIC)
+ win = Window("frame", elementary.ELM_WIN_BASIC)
win.title_set("Frame test")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- vbox = elementary.Box(win)
+ vbox = Box(win)
vbox.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(vbox)
vbox.show()
# frame 1
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/logo_small.png")
- fr = elementary.Frame(win)
+ fr = Frame(win)
fr.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
fr.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
fr.text_set("Frame title")
@@ -35,10 +40,10 @@ def frame_clicked(obj):
fr.show()
# frame 2 (collapsable)
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/logo_small.png")
- fr = elementary.Frame(win)
+ fr = Frame(win)
fr.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
fr.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
fr.autocollapse_set(True)