Skip to content

Commit

Permalink
Fixes being cut off on different screen scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
MechTechnology authored Jun 10, 2021
1 parent 2d76b19 commit 651ba6c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions SmartStitchGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ def SetupWindow(self):
self.iconphoto(False, PhotoImage(file = "SmartStitchLogo.png"))

# Sets Window Size, centers it on Launch and Prevents Resize.
window_height = 280
window_width = 500
window_width = self.winfo_width()
window_height = self.winfo_height()
screen_width = self.winfo_screenwidth()
screen_height = self.winfo_screenheight()
x_cordinate = int((screen_width/2) - (window_width/2))
y_cordinate = int((screen_height/2) - (window_height/2))
self.geometry("{}x{}+{}+{}".format(window_width, window_height, x_cordinate, y_cordinate))
x = (self.winfo_screenwidth()/2) - (window_height/2) - 120
y = (self.winfo_screenheight()/2) - (window_width/2) - 40
self.geometry('+%d+%d' % (x, y))
self.columnconfigure(0, weight=1)
self.resizable(False, False)

Expand Down

0 comments on commit 651ba6c

Please sign in to comment.