[Python-checkins] bpo-40219: Lowered ttk LabeledScale dummy (GH-21467)

miss-islington webhook-mailer at python.org
Tue Dec 15 15:02:07 EST 2020


https://github.com/python/cpython/commit/13d40c2a418116797eccd77bd65e4dbd689008db
commit: 13d40c2a418116797eccd77bd65e4dbd689008db
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2020-12-15T12:02:03-08:00
summary:

bpo-40219: Lowered ttk LabeledScale dummy (GH-21467)

(cherry picked from commit b9ced83cf427ec86802ba4c9a562c6d9cafc72f5)

Co-authored-by: E-Paine <63801254+E-Paine at users.noreply.github.com>

files:
A Misc/NEWS.d/next/Library/2020-07-13-19-43-11.bpo-40219.MUoJEP.rst
M Lib/tkinter/ttk.py

diff --git a/Lib/tkinter/ttk.py b/Lib/tkinter/ttk.py
index 968fd54dce1ee..f3a2f7660f30b 100644
--- a/Lib/tkinter/ttk.py
+++ b/Lib/tkinter/ttk.py
@@ -1538,7 +1538,10 @@ def __init__(self, master=None, variable=None, from_=0, to=10, **kw):
         scale_side = 'bottom' if self._label_top else 'top'
         label_side = 'top' if scale_side == 'bottom' else 'bottom'
         self.scale.pack(side=scale_side, fill='x')
-        tmp = Label(self).pack(side=label_side) # place holder
+        # Dummy required to make frame correct height
+        dummy = Label(self)
+        dummy.pack(side=label_side)
+        dummy.lower()
         self.label.place(anchor='n' if label_side == 'top' else 's')
 
         # update the label as scale or variable changes
diff --git a/Misc/NEWS.d/next/Library/2020-07-13-19-43-11.bpo-40219.MUoJEP.rst b/Misc/NEWS.d/next/Library/2020-07-13-19-43-11.bpo-40219.MUoJEP.rst
new file mode 100644
index 0000000000000..aedc5c49b4087
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2020-07-13-19-43-11.bpo-40219.MUoJEP.rst
@@ -0,0 +1 @@
+Lowered :class:`tkinter.ttk.LabeledScale` dummy widget to prevent hiding part of the content label.



More information about the Python-checkins mailing list