[Python-checkins] bpo-33987: IDLE: Use ttk Frame on doc window and statusbar (GH-11433) (GH-22900)

terryjreedy webhook-mailer at python.org
Thu Oct 22 15:58:34 EDT 2020


https://github.com/python/cpython/commit/06c9e01c651c35c2e058eca0f7073dd405578f78
commit: 06c9e01c651c35c2e058eca0f7073dd405578f78
branch: 3.8
author: Miss Skeleton (bot) <31488909+miss-islington at users.noreply.github.com>
committer: terryjreedy <tjreedy at udel.edu>
date: 2020-10-22T15:58:30-04:00
summary:

bpo-33987: IDLE: Use ttk Frame on doc window and statusbar (GH-11433) (GH-22900)

(cherry picked from commit facb522d44fceaf15de6bc95de1cd680c4621c2a)

Co-authored-by: Cheryl Sabella <cheryl.sabella at gmail.com>

files:
M Lib/idlelib/help.py
M Lib/idlelib/statusbar.py

diff --git a/Lib/idlelib/help.py b/Lib/idlelib/help.py
index 9f63ea0d3990e..f420d40fb9ea4 100644
--- a/Lib/idlelib/help.py
+++ b/Lib/idlelib/help.py
@@ -28,8 +28,8 @@
 from os.path import abspath, dirname, isfile, join
 from platform import python_version
 
-from tkinter import Toplevel, Frame, Text, Menu
-from tkinter.ttk import Menubutton, Scrollbar
+from tkinter import Toplevel, Text, Menu
+from tkinter.ttk import Frame, Menubutton, Scrollbar, Style
 from tkinter import font as tkfont
 
 from idlelib.config import idleConf
@@ -212,7 +212,9 @@ class HelpFrame(Frame):
     def __init__(self, parent, filename):
         Frame.__init__(self, parent)
         self.text = text = HelpText(self, filename)
-        self['background'] = text['background']
+        self.style = Style(parent)
+        self['style'] = 'helpframe.TFrame'
+        self.style.configure('helpframe.TFrame', background=text['background'])
         self.toc = toc = self.toc_menu(text)
         self.scroll = scroll = Scrollbar(self, command=text.yview)
         text['yscrollcommand'] = scroll.set
diff --git a/Lib/idlelib/statusbar.py b/Lib/idlelib/statusbar.py
index c071f898b0f74..ae52a56368c82 100644
--- a/Lib/idlelib/statusbar.py
+++ b/Lib/idlelib/statusbar.py
@@ -1,4 +1,5 @@
-from tkinter import Frame, Label
+from tkinter import Label
+from tkinter.ttk import Frame
 
 
 class MultiStatusBar(Frame):
@@ -20,7 +21,8 @@ def set_label(self, name, text='', side='left', width=0):
 
 
 def _multistatus_bar(parent):  # htest #
-    from tkinter import Toplevel, Frame, Text, Button
+    from tkinter import Toplevel, Text
+    from tkinter.ttk import Frame, Button
     top = Toplevel(parent)
     x, y = map(int, parent.geometry().split('+')[1:])
     top.geometry("+%d+%d" %(x, y + 175))



More information about the Python-checkins mailing list