diff options
author | Aleksey Lim <alsroot@sugarlabs.org> | 2012-06-06 07:18:26 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@sugarlabs.org> | 2012-06-06 07:18:36 (GMT) |
commit | 2931f2f1bc98096eb8d270ea467f8244a67e808c (patch) | |
tree | fefe7cfbf7edae5790111e84a684e1f4648c1508 /Edit/TrackInterface.py | |
parent | 3b162ef806b77cf4bdf85eccd40854479dc222a0 (diff) |
Add singular access point for getting image files; add 73% scaled images for resolution <=800
Diffstat (limited to 'Edit/TrackInterface.py')
-rw-r--r-- | Edit/TrackInterface.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Edit/TrackInterface.py b/Edit/TrackInterface.py index ad740ee..73f70df 100644 --- a/Edit/TrackInterface.py +++ b/Edit/TrackInterface.py @@ -8,6 +8,7 @@ from math import floor import time import common.Config as Config +from common.Config import imagefile from Edit.NoteInterface import NoteInterface from Edit.HitInterface import HitInterface from Edit.MainWindow import CONTEXT @@ -128,13 +129,13 @@ class TrackInterface( gtk.EventBox ): self.gc = gtk.gdk.GC( win ) def prepareDrawable( name, width = -1 ): - pix = gtk.gdk.pixbuf_new_from_file( Config.IMAGE_ROOT+name+".png" ) + pix = gtk.gdk.pixbuf_new_from_file(imagefile(name + '.png')) if width != -1: pix = pix.scale_simple(width, pix.get_height(), gtk.gdk.INTERP_BILINEAR) self.image[name] = gtk.gdk.Pixmap( win, pix.get_width(), pix.get_height() ) self.image[name].draw_pixbuf( self.gc, pix, 0, 0, 0, 0, pix.get_width(), pix.get_height(), gtk.gdk.RGB_DITHER_NONE ) def preparePixbuf( name ): - self.image[name] = gtk.gdk.pixbuf_new_from_file( Config.IMAGE_ROOT+name+".png" ) + self.image[name] = gtk.gdk.pixbuf_new_from_file(imagefile(name + '.png')) prepareDrawable( "trackBG", width ) prepareDrawable( "trackBGSelected", width ) |