added adjust_margin() utility

This commit is contained in:
2021-06-09 11:18:18 +02:00
parent 51810ad75a
commit 3dfce8f5e5

6
kabuki/utils.py Normal file
View File

@ -0,0 +1,6 @@
def adjust_margin(obj, top=0, right=0, bottom=0, left=0):
delta = (top, right, bottom, left)
obj.margin = [m + d for m, d in zip(obj.margin, delta)]