]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-40219: Lowered ttk LabeledScale dummy (GH-21467)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 15 Dec 2020 20:02:03 +0000 (12:02 -0800)
committerGitHub <noreply@github.com>
Tue, 15 Dec 2020 20:02:03 +0000 (12:02 -0800)
(cherry picked from commit b9ced83cf427ec86802ba4c9a562c6d9cafc72f5)

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
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 968fd54dce1ee0070015aa0ea72bee2614a74110..f3a2f7660f30b83c801c5f16191367a345cc3368 100644 (file)
@@ -1538,7 +1538,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.