Skip to content

Commit

Permalink
[2186] Correct Logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Rixxan committed Apr 5, 2024
1 parent fbdc441 commit 3a8227a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions EDMarketConnector.py
Original file line number Diff line number Diff line change
Expand Up @@ -1750,8 +1750,7 @@ def __init__(self, parent: tk.Tk) -> None:

# position over parent
# http://core.tcl.tk/tk/tktview/c84f660833546b1b84e7
if parent.winfo_rooty() > 0:
self.geometry(f'+{parent.winfo_rootx():d}+{parent.winfo_rooty():d}')
self.geometry(f'+{parent.winfo_rootx():d}+{parent.winfo_rooty():d}')

# remove decoration
if sys.platform == 'win32':
Expand Down Expand Up @@ -1870,9 +1869,8 @@ def onexit(self, event=None) -> None:
config.set_shutdown() # Signal we're in shutdown now.

# http://core.tcl.tk/tk/tktview/c84f660833546b1b84e7
if self.w.winfo_rooty() > 0:
x, y = self.w.geometry().split('+')[1:3] # e.g. '212x170+2881+1267'
config.set('geometry', f'+{x}+{y}')
x, y = self.w.geometry().split('+')[1:3] # e.g. '212x170+2881+1267'
config.set('geometry', f'+{x}+{y}')

# Let the user know we're shutting down.
# LANG: The application is shutting down
Expand Down
6 changes: 3 additions & 3 deletions prefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,9 @@ def __init__(self, parent: tk.Tk, callback: Optional[Callable]):
self.transient(parent)

# position over parent
if parent.winfo_rooty() > 0: # http://core.tcl.tk/tk/tktview/c84f660833546b1b84e7
# TODO this is fixed supposedly.
self.geometry(f'+{parent.winfo_rootx()}+{parent.winfo_rooty()}')
# http://core.tcl.tk/tk/tktview/c84f660833546b1b84e7
# TODO this is fixed supposedly.
self.geometry(f'+{parent.winfo_rootx()}+{parent.winfo_rooty()}')

# remove decoration
if sys.platform == 'win32':
Expand Down

0 comments on commit 3a8227a

Please sign in to comment.