]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-40219: Lowered ttk LabeledScale dummy (GH-21467) (GH-23788)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 19 Dec 2020 17:28:59 +0000 (09:28 -0800)
committerGitHub <noreply@github.com>
Sat, 19 Dec 2020 17:28:59 +0000 (19:28 +0200)
(cherry picked from commit b9ced83cf427ec86802ba4c9a562c6d9cafc72f5)

Lib/tkinter/ttk.py
Misc/NEWS.d/next/Library/2020-07-13-19-43-11.bpo-40219.MUoJEP.rst [new file with mode: 0644]

index 523edb9715f08b77403fb6a4947e9c7fc41b30f7..ab7aeb15e8ff222e3b99bc56badba70ea0f17098 100644 (file)
@@ -1533,7 +1533,10 @@ class LabeledScale(Frame):
         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 (file)
index 0000000..aedc5c4
--- /dev/null
@@ -0,0 +1 @@
+Lowered :class:`tkinter.ttk.LabeledScale` dummy widget to prevent hiding part of the content label.