1
0
mirror of https://github.com/gryf/wmdocklib.git synced 2025-12-19 12:28:10 +01:00

1724798: labels are not aligned

implemented the 'align' parameter to the Application.addLabel method.

the pywmhelpers.addString function now returns the x-size of the string.

moved all labels in pywmdatetime one pixel to the left.
This commit is contained in:
mfrasca
2007-05-24 19:04:48 +00:00
parent e5a8d777b6
commit 48b67704bb
3 changed files with 46 additions and 26 deletions

View File

@@ -114,17 +114,18 @@ class Application(wmoo.Application):
bg=0, fg=2, palette=palette,
background=background,
debug=options.debug)
if options.antialiased:
self.addLabel('date', orig=(5,24), size=(54,10), align=wmoo.CENTRE)
self.addLabel('day', orig=(5,36), size=(54,10), align=wmoo.CENTRE)
self.addLabel('week', orig=(5,48), size=(54,10), align=wmoo.CENTRE)
self.addLabel('date', orig=(4,24), size=(54,10), align=wmoo.CENTRE)
self.addLabel('day', orig=(4,36), size=(54,10), align=wmoo.CENTRE)
self.addLabel('week', orig=(4,48), size=(54,10), align=wmoo.CENTRE)
else:
self.addLabel('time', orig=(5, 5), size=(54,10), align=wmoo.CENTRE)
self.addLabel('time2', orig=(5,16), size=(54,10), align=wmoo.CENTRE)
self.addLabel('date', orig=(5,27), size=(54,10), align=wmoo.CENTRE)
self.addLabel('day', orig=(5,38), size=(54,10), align=wmoo.CENTRE)
self.addLabel('week', orig=(5,49), size=(54,10), align=wmoo.CENTRE)
self.addLabel('time', orig=(4, 5), size=(54,10), align=wmoo.CENTRE)
self.addLabel('time2', orig=(4,16), size=(54,10), align=wmoo.CENTRE)
self.addLabel('date', orig=(4,27), size=(54,10), align=wmoo.CENTRE)
self.addLabel('day', orig=(4,38), size=(54,10), align=wmoo.CENTRE)
self.addLabel('week', orig=(4,49), size=(54,10), align=wmoo.CENTRE)
self.timeFmt = options.timeformat
self.dateFmt = options.dateformat