mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
1696016d54
@ -52,6 +52,7 @@ class DropdownMenu(tkinter.Menu):
|
|||||||
font=self._apply_font_scaling(self._font))
|
font=self._apply_font_scaling(self._font))
|
||||||
|
|
||||||
elif sys.platform.startswith("win"):
|
elif sys.platform.startswith("win"):
|
||||||
|
print("dropdon win")
|
||||||
self.configure(tearoff=False,
|
self.configure(tearoff=False,
|
||||||
relief="flat",
|
relief="flat",
|
||||||
activebackground=ThemeManager.single_color(self._hover_color, self._appearance_mode),
|
activebackground=ThemeManager.single_color(self._hover_color, self._appearance_mode),
|
||||||
@ -95,6 +96,7 @@ class DropdownMenu(tkinter.Menu):
|
|||||||
self._command(value)
|
self._command(value)
|
||||||
|
|
||||||
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":
|
||||||
y += self._apply_widget_scaling(8)
|
y += self._apply_widget_scaling(8)
|
||||||
else:
|
else:
|
||||||
@ -129,6 +131,8 @@ class DropdownMenu(tkinter.Menu):
|
|||||||
self._values = kwargs.pop("values")
|
self._values = kwargs.pop("values")
|
||||||
self._add_menu_commands()
|
self._add_menu_commands()
|
||||||
|
|
||||||
|
super().configure(**kwargs)
|
||||||
|
|
||||||
def cget(self, attribute_name: str) -> any:
|
def cget(self, attribute_name: str) -> any:
|
||||||
if attribute_name == "min_character_width":
|
if attribute_name == "min_character_width":
|
||||||
return self._min_character_width
|
return self._min_character_width
|
||||||
|
@ -99,5 +99,5 @@ scrollbar4 = customtkinter.CTkScrollbar(app, command=textbox_4.yview)
|
|||||||
scrollbar4.grid(row=0, column=5, sticky="nsew")
|
scrollbar4.grid(row=0, column=5, sticky="nsew")
|
||||||
textbox_4.configure(yscrollcommand=scrollbar4.set)
|
textbox_4.configure(yscrollcommand=scrollbar4.set)
|
||||||
|
|
||||||
app.after(3000, lambda: customtkinter.set_appearance_mode("light"))
|
# app.after(3000, lambda: customtkinter.set_appearance_mode("light"))
|
||||||
app.mainloop()
|
app.mainloop()
|
||||||
|
Loading…
Reference in New Issue
Block a user