Skip to content

Commit

Permalink
make it conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
Pololot64 committed Dec 23, 2022
1 parent 87f729c commit 9e4ddda
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ def quitter():
boxRoot.title("Open In WSL")
boxRoot.iconname("Dialog")
WIDTH, HEIGHT = ui.inch2pix(5), ui.inch2pix(5.5)
#boxRoot.minsize(WIDTH, HEIGHT)
boxRoot.minsize(WIDTH, HEIGHT)
boxRoot.running = True
boxRoot.protocol("WM_DELETE_WINDOW", quitter)
boxRoot.geometry('+%d+%d' % (screensize[0] / 2 - WIDTH / 2, screensize[1] / 2 - HEIGHT / 2 - ui.inch2pix(0.5)))
Expand Down Expand Up @@ -973,7 +973,7 @@ def helper():
boxRoot.rowconfigure(1, weight=1)


boxRoot.columnconfigure(0, weight=0)
boxRoot.columnconfigure(0, weight=1)


boxRoot.rowconfigure(2, weight=1)
Expand All @@ -998,7 +998,11 @@ def helper():


#boxRoot.minsize(boxRoot.winfo_width(), boxRoot.winfo_height())
boxRoot.minsize(boxRoot.winfo_reqwidth(), boxRoot.winfo_reqheight())

rw, rh = boxRoot.winfo_reqwidth(), boxRoot.winfo_reqheight()

if rw > WIDTH or rh > HEIGHT:
boxRoot.minsize(rw, rh)

boxRoot.deiconify()

Expand Down

0 comments on commit 9e4ddda

Please sign in to comment.