Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions Lib/idlelib/configdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ def __init__(self, parent, title='', *, _htest=False, _utest=False):
self.withdraw()

self.title(title or 'IDLE Preferences')
x = parent.winfo_rootx() + 20
y = parent.winfo_rooty() + (30 if not _htest else 150)
self.geometry(f'+{x}+{y}')

# Each theme element key is its display name.
# The first value of the tuple is the sample area tag name.
# The second value is the display name list sort index.
Expand All @@ -88,6 +86,15 @@ def __init__(self, parent, title='', *, _htest=False, _utest=False):
# Attach callbacks after loading config to avoid calling them.
tracers.attach()

self.update()
x = parent.winfo_rootx() + 20
y = parent.winfo_rooty() + (30 if not _htest else 150)
w = self.winfo_width()
h = self.winfo_height()

self.geometry(f'{w}x{h}+{x}+{y}')
self.resizable(height=FALSE, width=FALSE)

if not _utest:
self.grab_set()
self.wm_deiconify()
Expand All @@ -112,7 +119,7 @@ def create_widgets(self):
activate_config_changes: Tell editors to reload.
"""
self.frame = frame = Frame(self, padding=5)
self.frame.grid(sticky="nwes")
self.frame.pack(expand=1, fill="both")
self.note = note = Notebook(frame)
self.extpage = ExtPage(note)
self.highpage = HighPage(note, self.extpage)
Expand Down
Loading