From 33d6e9d4df57599093d7db25c25806f4a1b9b073 Mon Sep 17 00:00:00 2001 From: Shikiryu Date: Thu, 16 May 2024 00:19:49 +0200 Subject: [PATCH] :lipstick: Add better displayed tooltip --- src/element/toolbar.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/element/toolbar.py b/src/element/toolbar.py index e509719..33be9f8 100644 --- a/src/element/toolbar.py +++ b/src/element/toolbar.py @@ -26,40 +26,40 @@ class Toolbar: next_button = customtkinter.CTkButton(toolbar, image=ImageTk.PhotoImage(Image.open("assets/icons/next.png")), text="", command=self.image_window.next_image) 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" "-white.png")), text="", command=self.toggle_black_white) 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="", image=ImageTk.PhotoImage(Image.open("assets/icons/flip.png"))) 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="", image=ImageTk.PhotoImage(Image.open("assets/icons/folder.png"))) 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="", image=ImageTk.PhotoImage( Image.open("assets/icons/copy.png"))) 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="", image=ImageTk.PhotoImage( Image.open("assets/icons/maximize.png"))) 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="", image=ImageTk.PhotoImage(Image.open("assets/icons/timer.png"))) 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), text_color=Util.get_default_button_color())