Author: duncan
Date: Sun Jun 17 09:34:42 2007
New Revision: 9714
Modified:
branches/rel-1/freevo/src/plugins/idlebar/diskfree.py
Log:
Centred remaining space text on disk free bar
Modified: branches/rel-1/freevo/src/plugins/idlebar/diskfree.py
==============================================================================
--- branches/rel-1/freevo/src/plugins/idlebar/diskfree.py (original)
+++ branches/rel-1/freevo/src/plugins/idlebar/diskfree.py Sun Jun 17
09:34:42 2007
@@ -106,10 +106,10 @@
diskimg.blit(diskbar, (0,0), (0, 0, (w * self.percent), h))
self.cacheimg['cached'] = diskimg
font = osd.get_font('small0')
- widthdf = 0
widthdf = font.stringsize(self.diskfree)
+ diskfree_x = x + ((w - widthdf) / 2)
+ diskfree_y = osd.y + 55 - font.h
w = osd.drawimage(diskimg, (x, osd.y + 7, -1, -1) )[0]
- osd.write_text(self.diskfree, font, None, x, osd.y + 55 - font.h,
widthdf, font.h, 'center', 'top')
- #print 'w=%s, widthdf=%s' % (w, widthdf+15)
+ osd.write_text(self.diskfree, font, None, diskfree_x, diskfree_y,
widthdf, font.h, 'center', 'top')
return widthdf + 15
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog