summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-12-19 17:28:59 (GMT)
committerGitHub <noreply@github.com>2020-12-19 17:28:59 (GMT)
commit6ad5fd14825fc6039a9684dfdc14f5d12b86e25f (patch)
tree3dca0281a62220c000af8f2363d5d793353f095d
parent87e7a14ee3bd7dc495e51166598453114342d0bf (diff)
downloadcpython-6ad5fd14825fc6039a9684dfdc14f5d12b86e25f.zip
cpython-6ad5fd14825fc6039a9684dfdc14f5d12b86e25f.tar.gz
cpython-6ad5fd14825fc6039a9684dfdc14f5d12b86e25f.tar.bz2
bpo-40219: Lowered ttk LabeledScale dummy (GH-21467) (GH-23788)
(cherry picked from commit b9ced83cf427ec86802ba4c9a562c6d9cafc72f5)
-rw-r--r--Lib/tkinter/ttk.py5
-rw-r--r--Misc/NEWS.d/next/Library/2020-07-13-19-43-11.bpo-40219.MUoJEP.rst1
2 files changed, 5 insertions, 1 deletions
diff --git a/Lib/tkinter/ttk.py b/Lib/tkinter/ttk.py
index 523edb9..ab7aeb1 100644
--- a/Lib/tkinter/ttk.py
+++ b/Lib/tkinter/ttk.py
@@ -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
index 0000000..aedc5c4
--- /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.