Skip to content

Commit e03a964

Browse files
fix window resizing on SHED, WIN, and EXT tab in configdialog
add a fix geometry with size of the biggest frame that is Font Chooser. change the self.frame geometry manager from grid to pack to let it take full available space
1 parent 37c3554 commit e03a964

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

Lib/idlelib/configdialog.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ def __init__(self, parent, title='', *, _htest=False, _utest=False):
6969
self.withdraw()
7070

7171
self.title(title or 'IDLE Preferences')
72-
x = parent.winfo_rootx() + 20
73-
y = parent.winfo_rooty() + (30 if not _htest else 150)
74-
self.geometry(f'+{x}+{y}')
72+
7573
# Each theme element key is its display name.
7674
# The first value of the tuple is the sample area tag name.
7775
# The second value is the display name list sort index.
@@ -88,6 +86,15 @@ def __init__(self, parent, title='', *, _htest=False, _utest=False):
8886
# Attach callbacks after loading config to avoid calling them.
8987
tracers.attach()
9088

89+
self.update()
90+
x = parent.winfo_rootx() + 20
91+
y = parent.winfo_rooty() + (30 if not _htest else 150)
92+
w = self.winfo_width()
93+
h = self.winfo_height()
94+
95+
self.geometry(f'{w}x{h}+{x}+{y}')
96+
self.resizable(height=FALSE, width=FALSE)
97+
9198
if not _utest:
9299
self.grab_set()
93100
self.wm_deiconify()
@@ -112,7 +119,7 @@ def create_widgets(self):
112119
activate_config_changes: Tell editors to reload.
113120
"""
114121
self.frame = frame = Frame(self, padding=5)
115-
self.frame.grid(sticky="nwes")
122+
self.frame.pack(expand=1, fill="both")
116123
self.note = note = Notebook(frame)
117124
self.extpage = ExtPage(note)
118125
self.highpage = HighPage(note, self.extpage)

0 commit comments

Comments
 (0)