💄 Add better displayed tooltip
This commit is contained in:
parent
3b17dff7be
commit
33d6e9d4df
@ -26,40 +26,40 @@ class Toolbar:
|
|||||||
next_button = customtkinter.CTkButton(toolbar, image=ImageTk.PhotoImage(Image.open("assets/icons/next.png")),
|
next_button = customtkinter.CTkButton(toolbar, image=ImageTk.PhotoImage(Image.open("assets/icons/next.png")),
|
||||||
text="", command=self.image_window.next_image)
|
text="", command=self.image_window.next_image)
|
||||||
next_button.pack(side=LEFT, padx=0, pady=0)
|
next_button.pack(side=LEFT, padx=0, pady=0)
|
||||||
CTkToolTip(next_button, delay=0.5, message="Next")
|
CTkToolTip(next_button, delay=0.1, message="Next", y_offset=-40, x_offset=-40)
|
||||||
|
|
||||||
self.bw_button = customtkinter.CTkButton(toolbar, image=ImageTk.PhotoImage(Image.open("assets/icons/black-and"
|
self.bw_button = customtkinter.CTkButton(toolbar, image=ImageTk.PhotoImage(Image.open("assets/icons/black-and"
|
||||||
"-white.png")),
|
"-white.png")),
|
||||||
text="", command=self.toggle_black_white)
|
text="", command=self.toggle_black_white)
|
||||||
self.bw_button.pack(side=LEFT, padx=0, pady=0)
|
self.bw_button.pack(side=LEFT, padx=0, pady=0)
|
||||||
CTkToolTip(self.bw_button, delay=0.5, message="Black and white image")
|
CTkToolTip(self.bw_button, delay=0.1, message="Black and white image", y_offset=-40, x_offset=-40)
|
||||||
|
|
||||||
self.mirror_button = customtkinter.CTkButton(toolbar, command=self.toggle_mirror, text="",
|
self.mirror_button = customtkinter.CTkButton(toolbar, command=self.toggle_mirror, text="",
|
||||||
image=ImageTk.PhotoImage(Image.open("assets/icons/flip.png")))
|
image=ImageTk.PhotoImage(Image.open("assets/icons/flip.png")))
|
||||||
self.mirror_button.pack(side=LEFT, padx=0, pady=0)
|
self.mirror_button.pack(side=LEFT, padx=0, pady=0)
|
||||||
CTkToolTip(self.mirror_button, delay=0.5, message="Mirrored image")
|
CTkToolTip(self.mirror_button, delay=0.1, message="Mirrored image", y_offset=-40, x_offset=-40)
|
||||||
|
|
||||||
open_folder_button = customtkinter.CTkButton(toolbar, command=self.open_folder, text="",
|
open_folder_button = customtkinter.CTkButton(toolbar, command=self.open_folder, text="",
|
||||||
image=ImageTk.PhotoImage(Image.open("assets/icons/folder.png")))
|
image=ImageTk.PhotoImage(Image.open("assets/icons/folder.png")))
|
||||||
open_folder_button.pack(side=LEFT, padx=0, pady=0)
|
open_folder_button.pack(side=LEFT, padx=0, pady=0)
|
||||||
CTkToolTip(open_folder_button, delay=0.5, message="Open folder")
|
CTkToolTip(open_folder_button, delay=0.1, message="Open folder", y_offset=-40, x_offset=-40)
|
||||||
|
|
||||||
self.always_on_top_button = customtkinter.CTkButton(toolbar, command=self.toggle_always_on_top, text="",
|
self.always_on_top_button = customtkinter.CTkButton(toolbar, command=self.toggle_always_on_top, text="",
|
||||||
image=ImageTk.PhotoImage(
|
image=ImageTk.PhotoImage(
|
||||||
Image.open("assets/icons/copy.png")))
|
Image.open("assets/icons/copy.png")))
|
||||||
self.always_on_top_button.pack(side=LEFT, padx=0, pady=0)
|
self.always_on_top_button.pack(side=LEFT, padx=0, pady=0)
|
||||||
CTkToolTip(self.always_on_top_button, delay=0.5, message="Always on top")
|
CTkToolTip(self.always_on_top_button, delay=0.1, message="Always on top", y_offset=-40, x_offset=-40)
|
||||||
|
|
||||||
self.fullscreen_button = customtkinter.CTkButton(toolbar, command=self.toggle_fullscreen, text="",
|
self.fullscreen_button = customtkinter.CTkButton(toolbar, command=self.toggle_fullscreen, text="",
|
||||||
image=ImageTk.PhotoImage(
|
image=ImageTk.PhotoImage(
|
||||||
Image.open("assets/icons/maximize.png")))
|
Image.open("assets/icons/maximize.png")))
|
||||||
self.fullscreen_button.pack(side=LEFT, padx=0, pady=0)
|
self.fullscreen_button.pack(side=LEFT, padx=0, pady=0)
|
||||||
CTkToolTip(self.fullscreen_button, delay=0.5, message="Fullscreen")
|
CTkToolTip(self.fullscreen_button, delay=0.1, message="Fullscreen", y_offset=-40, x_offset=-40)
|
||||||
|
|
||||||
timer_button = customtkinter.CTkButton(toolbar, command=self.toggle_timer, text="",
|
timer_button = customtkinter.CTkButton(toolbar, command=self.toggle_timer, text="",
|
||||||
image=ImageTk.PhotoImage(Image.open("assets/icons/timer.png")))
|
image=ImageTk.PhotoImage(Image.open("assets/icons/timer.png")))
|
||||||
timer_button.pack(side=LEFT, padx=0, pady=0)
|
timer_button.pack(side=LEFT, padx=0, pady=0)
|
||||||
CTkToolTip(timer_button, delay=0.5, message="Toggle timer")
|
CTkToolTip(timer_button, delay=0.1, message="Toggle timer", y_offset=-40, x_offset=-40)
|
||||||
|
|
||||||
self.timer_label = customtkinter.CTkLabel(toolbar, text=str(self.timer),
|
self.timer_label = customtkinter.CTkLabel(toolbar, text=str(self.timer),
|
||||||
text_color=Util.get_default_button_color())
|
text_color=Util.get_default_button_color())
|
||||||
|
Loading…
Reference in New Issue
Block a user