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,10 +70,16 @@ 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):
|
||||||
for value in self.values:
|
if sys.platform.startswith("linux"):
|
||||||
self.add_command(label=value.ljust(self.min_character_width),
|
for value in self.values:
|
||||||
command=lambda v=value: self.button_callback(v),
|
self.add_command(label=" " + value.ljust(self.min_character_width) + " ",
|
||||||
compound="left")
|
command=lambda v=value: self.button_callback(v),
|
||||||
|
compound="left")
|
||||||
|
else:
|
||||||
|
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")
|
||||||
|
|
||||||
def open(self, x: Union[int, float], y: Union[int, float]):
|
def open(self, x: Union[int, float], y: Union[int, float]):
|
||||||
if sys.platform == "darwin":
|
if sys.platform == "darwin":
|
||||||
|
Loading…
Reference in New Issue
Block a user