pygui some cleanup for dialog constructors to avoid passing duplicate parameters in most cases

This commit is contained in:
Blake Harnden 2020-05-04 22:50:59 -07:00
parent 185c6736b3
commit 1d620a0b17
42 changed files with 143 additions and 209 deletions

View file

@ -11,8 +11,14 @@ if TYPE_CHECKING:
class Dialog(tk.Toplevel):
def __init__(
self, master: tk.Widget, app: "Application", title: str, modal: bool = True
self,
app: "Application",
title: str,
modal: bool = True,
master: tk.BaseWidget = None,
):
if master is None:
master = app
super().__init__(master)
self.withdraw()
self.app = app