Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.8] bpo-33987: Use master ttk Frame for IDLE config dialog (GH-22943) #22952

Merged
merged 1 commit into from
Oct 25, 2020
Merged
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
12 changes: 7 additions & 5 deletions Lib/idlelib/configdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ def __init__(self, parent, title='', *, _htest=False, _utest=False):
if not _utest:
self.withdraw()

self.configure(borderwidth=5)
self.title(title or 'IDLE Preferences')
x = parent.winfo_rootx() + 20
y = parent.winfo_rooty() + (30 if not _htest else 150)
Expand Down Expand Up @@ -97,6 +96,7 @@ def create_widgets(self):
"""Create and place widgets for tabbed dialog.

Widgets Bound to self:
frame: encloses all other widgets
note: Notebook
highpage: HighPage
fontpage: FontPage
Expand All @@ -109,7 +109,9 @@ def create_widgets(self):
load_configs: Load pages except for extensions.
activate_config_changes: Tell editors to reload.
"""
self.note = note = Notebook(self)
self.frame = frame = Frame(self, padding="5px")
self.frame.grid(sticky="nwes")
self.note = note = Notebook(frame)
self.highpage = HighPage(note)
self.fontpage = FontPage(note, self.highpage)
self.keyspage = KeysPage(note)
Expand Down Expand Up @@ -148,7 +150,7 @@ def create_action_buttons(self):
padding_args = {}
else:
padding_args = {'padding': (6, 3)}
outer = Frame(self, padding=2)
outer = Frame(self.frame, padding=2)
buttons_frame = Frame(outer, padding=2)
self.buttons = {}
for txt, cmd in (
Expand Down Expand Up @@ -687,7 +689,7 @@ class HighPage(Frame):

def __init__(self, master):
super().__init__(master)
self.cd = master.master
self.cd = master.winfo_toplevel()
self.style = Style(master)
self.create_page_highlight()
self.load_theme_cfg()
Expand Down Expand Up @@ -1346,7 +1348,7 @@ class KeysPage(Frame):

def __init__(self, master):
super().__init__(master)
self.cd = master.master
self.cd = master.winfo_toplevel()
self.create_page_keys()
self.load_key_cfg()

Expand Down