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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user