Skip to content

Commit d8bf46c

Browse files
committed
Simplify code
1 parent cbbc201 commit d8bf46c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

albow/dialog/TitledDialog.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,15 @@ def __init__(self, title: str = 'Default Title', message: str = '',
4848
if thirdButtTxt is not None:
4949
butThree = Button(thirdButtTxt, action=lambda x=thirdButtTxt: self.dismiss(x))
5050

51+
buttRowAttrs = {
52+
'spacing': margin,
53+
'equalize': 'w',
54+
'margin': 4
55+
}
5156
if butThree is None:
52-
buttRow: Row = Row([butOk, butCancel], spacing=margin, equalize='w', margin=4)
57+
buttRow: Row = Row([butOk, butCancel], **buttRowAttrs)
5358
else:
54-
buttRow: Row = Row([butOk, butCancel, butThree], spacing=margin, equalize='w', margin=4)
59+
buttRow: Row = Row([butOk, butCancel, butThree], **buttRowAttrs)
5560

5661
botColumn: Column = Column([lblMsg, buttRow], spacing=margin, align='r', margin=4)
5762

0 commit comments

Comments
 (0)