Add FRAMETIME constant to remove magic number supplied to edje.frametime_set()
Make EvasCanvas.__init__() honor the WIDTH and HEIGHT constants git-svn-id: http://www.neo1973-germany.de/svn@99 46df4e5c-bc4e-4628-a0fc-830ba316316d
This commit is contained in:
parent
1fc87d074d
commit
974ba5cae1
1 changed files with 3 additions and 2 deletions
|
@ -7,6 +7,7 @@ __license__ = "GPL3"
|
||||||
|
|
||||||
WIDTH = 480
|
WIDTH = 480
|
||||||
HEIGHT = 640
|
HEIGHT = 640
|
||||||
|
FRAMETIME = 1.0 / 20
|
||||||
FULLSCREEN = True
|
FULLSCREEN = True
|
||||||
TITLE = "epydial"
|
TITLE = "epydial"
|
||||||
WM_INFO = ("epydial", "epydial")
|
WM_INFO = ("epydial", "epydial")
|
||||||
|
@ -145,7 +146,7 @@ class dialer_main(edje_group):
|
||||||
|
|
||||||
class TestView(object):
|
class TestView(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
edje.frametime_set(1.0 / 20)
|
edje.frametime_set(FRAMETIME)
|
||||||
self.evas_canvas = EvasCanvas(fullscreen=FULLSCREEN, engine="x11-16", size="480x640")
|
self.evas_canvas = EvasCanvas(fullscreen=FULLSCREEN, engine="x11-16", size="480x640")
|
||||||
|
|
||||||
self.groups = {}
|
self.groups = {}
|
||||||
|
@ -165,7 +166,7 @@ class EvasCanvas(object):
|
||||||
print "warning: x11-16 is not supported, fallback to x11"
|
print "warning: x11-16 is not supported, fallback to x11"
|
||||||
f = ecore.evas.SoftwareX11
|
f = ecore.evas.SoftwareX11
|
||||||
|
|
||||||
self.evas_obj = f(w=480, h=640)
|
self.evas_obj = f(w=WIDTH, h=HEIGHT)
|
||||||
self.evas_obj.callback_delete_request = self.on_delete_request
|
self.evas_obj.callback_delete_request = self.on_delete_request
|
||||||
self.evas_obj.callback_resize = self.on_resize
|
self.evas_obj.callback_resize = self.on_resize
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue