Changed evtable to use a custom ljust/rjust routine instead of the ones from the python library. This resolves issues with width calculation of strings containing MXP links. Resolves #705.

This commit is contained in:
Griatch 2015-05-15 00:33:10 +02:00
parent 554b55c9ec
commit f5eeba72e0

View file

@ -568,11 +568,13 @@ class EvCell(object):
"""
align = self.align
hfill_char = self.hfill_char
width = self.width
if align == "l":
return [line.ljust(self.width, self.hfill_char) for line in data]
return [line + hfill_char * (width - m_len(line)) for line in data]
elif align == "r":
return [line.rjust(self.width, self.hfill_char) for line in data]
else:
return [hfill_char * (width - m_len(line)) + line for line in data]
else: # center, 'c'
return [self._center(line, self.width, self.hfill_char) for line in data]
def _valign(self, data):