adjustSize(): add support for edge chars
This commit is contained in:
parent
df331cd1f3
commit
52484b0d55
|
@ -522,6 +522,10 @@ class Boxes:
|
|||
self.addPart(parts.Parts(self))
|
||||
|
||||
def adjustSize(self, l, e1=True, e2=True):
|
||||
# Char to edge object
|
||||
e1 = self.edges.get(e1, e1)
|
||||
e2 = self.edges.get(e2, e2)
|
||||
|
||||
try:
|
||||
total = sum(l)
|
||||
walls = (len(l) - 1) * self.thickness
|
||||
|
@ -535,7 +539,7 @@ class Boxes:
|
|||
walls += self.thickness
|
||||
|
||||
if isinstance(e2, edges.BaseEdge):
|
||||
walls += e2.startwidth + e2.margin()
|
||||
walls += e2.startwidth() + e2.margin()
|
||||
elif e2:
|
||||
walls += self.thickness
|
||||
|
||||
|
|
Loading…
Reference in New Issue