diff options
author | walter bender <walter@walter-laptop.(none)> | 2008-11-22 22:39:25 (GMT) |
---|---|---|
committer | walter bender <walter@walter-laptop.(none)> | 2008-11-22 22:39:25 (GMT) |
commit | 9fa5616d53d298012c9a0738cb5f15b127cf42b7 (patch) | |
tree | 3d8978596a0d28e17aba5b381fa2c65a67c606ce /tasetup.py | |
parent | a0d0964db1bb6ca88286ee6513f3634b176350a4 (diff) |
Turtle Art uses SVG and knows about variable screen sizes
Diffstat (limited to 'tasetup.py')
-rw-r--r-- | tasetup.py | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -86,7 +86,9 @@ selectors = ( ('box2','box2','num')))) toolbaritems = ( - ('hideshow',990),('eraser',75), ('stopit',75)) + ('stopit',75), + ('eraser',75), + ('hideshow',75)) dockdetails = { 'noarg': (('flow',True,37,5),('flow',False,37,44)), @@ -131,8 +133,9 @@ def setup_selectors(tw): tw.status_shapes['status'] = load_image(tw.path, '', 'status') tw.status_shapes['nostack'] = load_image(tw.path, '', 'nostack') tw.status_shapes['noinput'] = load_image(tw.path, '', 'noinput') - tw.status_spr = sprNew(tw,0,743,tw.status_shapes['status'],True) - # tw.status_spr = sprNew(tw,0,670,tw.status_shapes['status'],True) + # position status shapes at bottom of screen (minus shape height and toolbar height) + screenh = gtk.gdk.screen_height() - 38 - 120 + tw.status_spr = sprNew(tw,0,screenh,tw.status_shapes['status'],True) tw.status_spr.type = 'status' setlayer(tw.status_spr,400) @@ -164,10 +167,11 @@ def setup_selector(tw,name,y,blockdescriptions): def setup_toolbar(tw): tw.toolsprs = {} - x,y = 0,10 + # need to adjust to variable screen width (from right to left) + x,y = gtk.gdk.screen_width(),10 for s in toolbaritems: name,dx= s - x += dx + x -= dx tw.toolsprs[name]=setup_tool(tw,x,y,name) return @@ -183,4 +187,4 @@ def setup_tool(tw,x,y,name): return who def load_image(path, dir, file): - return gtk.gdk.pixbuf_new_from_file(os.path.join(path,dir,file+'.gif')) + return gtk.gdk.pixbuf_new_from_file(os.path.join(path,dir,file+'.svg')) |