aboutsummaryrefslogtreecommitdiffstats
path: root/examples/elementary/test_access.py
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2013-10-30 11:36:54 +0200
committerKai Huuhko <kai.huuhko@gmail.com>2013-10-30 11:36:54 +0200
commit39598ed1f7283eb88b2040b26ab1263c6a47bb5c (patch)
tree6c4ee674a5067a01d06757495663f4b51fa6090c /examples/elementary/test_access.py
parentElementary.mbe: Remove commented out code, comment out an unimplemented method. (diff)
downloadpython-efl-39598ed1f7283eb88b2040b26ab1263c6a47bb5c.tar.gz
Elementary: More work on the examples.
Diffstat (limited to 'examples/elementary/test_access.py')
-rw-r--r--examples/elementary/test_access.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/elementary/test_access.py b/examples/elementary/test_access.py
index 9bf6718..54c8143 100644
--- a/examples/elementary/test_access.py
+++ b/examples/elementary/test_access.py
@@ -1,6 +1,8 @@
#!/usr/bin/env python
# encoding: utf-8
+import os
+
from efl.evas import EVAS_HINT_FILL, EVAS_HINT_EXPAND, \
EVAS_ASPECT_CONTROL_VERTICAL
from efl import elementary
@@ -22,6 +24,7 @@ FILL_BOTH = EVAS_HINT_FILL, EVAS_HINT_FILL
config = Configuration()
+img_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "images")
def cleanup_cb(obj):
config.access = False
@@ -36,7 +39,7 @@ class GLItC1(GenlistItemClass):
size_hint_align=FILL_BOTH, size_hint_weight=EXPAND_BOTH,
)
else:
- bt = Icon(gl, file="images/logo_small.png",
+ bt = Icon(gl, file=os.path.join(img_path, "logo_small.png")
size_hint_aspect=(EVAS_ASPECT_CONTROL_VERTICAL, 1, 1)
)
@@ -68,7 +71,8 @@ class GLItC2(GenlistItemClass):
class GGItC(GengridItemClass):
def content_get(self, gg, part, data):
if not part == "elm.swallow.icon":
- ic = Icon(gg, scale=0.5, file="images/icon_%02i.png" % (data % 4),
+ ic = Icon(gg, scale=0.5,
+ file=os.path.join(img_path, "icon_%02i.png" % (data % 4)),
resizable=(0, 0),
size_hint_weight=EXPAND_BOTH, size_hint_align=(0.5, 0.5)
)