mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
refined dropdown word spacing for linux
This commit is contained in:
parent
7a99aa318c
commit
3b259e4d01
@ -70,6 +70,12 @@ class DropdownMenu(tkinter.Menu):
|
|||||||
font=self.apply_font_scaling(self.text_font))
|
font=self.apply_font_scaling(self.text_font))
|
||||||
|
|
||||||
def add_menu_commands(self):
|
def add_menu_commands(self):
|
||||||
|
if sys.platform.startswith("linux"):
|
||||||
|
for value in self.values:
|
||||||
|
self.add_command(label=" " + value.ljust(self.min_character_width) + " ",
|
||||||
|
command=lambda v=value: self.button_callback(v),
|
||||||
|
compound="left")
|
||||||
|
else:
|
||||||
for value in self.values:
|
for value in self.values:
|
||||||
self.add_command(label=value.ljust(self.min_character_width),
|
self.add_command(label=value.ljust(self.min_character_width),
|
||||||
command=lambda v=value: self.button_callback(v),
|
command=lambda v=value: self.button_callback(v),
|
||||||
|
Loading…
Reference in New Issue
Block a user