summaryrefslogtreecommitdiff
path: root/examples/elementary/test_spinner.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_spinner.py
parente02e6491d4d7902df7c326e98d5a061a6bc3fccf (diff)
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_spinner.py')
-rw-r--r--examples/elementary/test_spinner.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/examples/elementary/test_spinner.py b/examples/elementary/test_spinner.py
index 169fc6f..2e8379b 100644
--- a/examples/elementary/test_spinner.py
+++ b/examples/elementary/test_spinner.py
@@ -1,28 +1,32 @@
1#!/usr/bin/env python 1#!/usr/bin/env python
2# encoding: utf-8 2# encoding: utf-8
3 3
4from efl import elementary
5from efl import evas 4from efl import evas
5from efl import elementary
6from efl.elementary.window import Window
7from efl.elementary.background import Background
8from efl.elementary.box import Box
9from efl.elementary.spinner import Spinner
6 10
7 11
8def spinner_clicked(obj): 12def spinner_clicked(obj):
9 win = elementary.Window("spinner", elementary.ELM_WIN_BASIC) 13 win = Window("spinner", elementary.ELM_WIN_BASIC)
10 win.title_set("Spinner test") 14 win.title_set("Spinner test")
11 win.autodel_set(True) 15 win.autodel_set(True)
12 if obj is None: 16 if obj is None:
13 win.callback_delete_request_add(lambda o: elementary.exit()) 17 win.callback_delete_request_add(lambda o: elementary.exit())
14 18
15 bg = elementary.Background(win) 19 bg = Background(win)
16 win.resize_object_add(bg) 20 win.resize_object_add(bg)
17 bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) 21 bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
18 bg.show() 22 bg.show()
19 23
20 bx = elementary.Box(win) 24 bx = Box(win)
21 bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) 25 bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
22 win.resize_object_add(bx) 26 win.resize_object_add(bx)
23 bx.show() 27 bx.show()
24 28
25 sp = elementary.Spinner(win) 29 sp = Spinner(win)
26 sp.label_format_set("%1.1f units") 30 sp.label_format_set("%1.1f units")
27 sp.step_set(1.3) 31 sp.step_set(1.3)
28 sp.wrap_set(1) 32 sp.wrap_set(1)
@@ -32,7 +36,7 @@ def spinner_clicked(obj):
32 bx.pack_end(sp) 36 bx.pack_end(sp)
33 sp.show() 37 sp.show()
34 38
35 sp = elementary.Spinner(win) 39 sp = Spinner(win)
36 sp.label_format_set("%1.1f units") 40 sp.label_format_set("%1.1f units")
37 sp.step_set(1.3) 41 sp.step_set(1.3)
38 sp.wrap_set(1) 42 sp.wrap_set(1)
@@ -43,7 +47,7 @@ def spinner_clicked(obj):
43 bx.pack_end(sp) 47 bx.pack_end(sp)
44 sp.show() 48 sp.show()
45 49
46 sp = elementary.Spinner(win) 50 sp = Spinner(win)
47 sp.label_format_set("Disabled %.0f") 51 sp.label_format_set("Disabled %.0f")
48 sp.disabled_set(1) 52 sp.disabled_set(1)
49 sp.min_max_set(-50.0, 250.0) 53 sp.min_max_set(-50.0, 250.0)