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

(cherry picked from commit b9ced83cf4)

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2020-12-15 12:02:03 -08:00 committed by GitHub
parent 925f998786
commit 13d40c2a41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View 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

View File

@ -0,0 +1 @@
Lowered :class:`tkinter.ttk.LabeledScale` dummy widget to prevent hiding part of the content label.