Skip to content

Commit 28e9ded

Browse files
committed
Make the hover text look better.
1 parent dd9ada9 commit 28e9ded

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

gui.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
import os
77
import requests
88

9-
9+
# Colors and fonts
1010
PRIMARY_BG = "#1e1e2e"
1111
ACCENT = "#2d2d46"
1212
TEXT_COLOR = "#f5f5f5"
13+
TOOLTIP_BG = "#2a2a3b"
14+
TOOLTIP_TEXT = "#ffffff"
1315
BUTTON_COLOR = "#313244"
1416
BUTTON_HOVER = "#45475a"
1517
FONT = ("Segoe UI", 11)
@@ -23,10 +25,13 @@ def create_tooltip(widget, text):
2325
label = tk.Label(
2426
tooltip,
2527
text=text,
26-
background="#ffffe0",
28+
background=TOOLTIP_BG,
29+
foreground=TOOLTIP_TEXT,
2730
relief="solid",
2831
borderwidth=1,
29-
font=("Segoe UI", 9),
32+
font=FONT,
33+
padx=6,
34+
pady=2,
3035
)
3136
label.pack()
3237

@@ -68,6 +73,7 @@ def browse_file(entry_field):
6873
entry_field.delete(0, tk.END)
6974
entry_field.insert(0, filepath)
7075

76+
7177
def load_icon(path_or_url, size=(18, 18)):
7278
if path_or_url.startswith("http"):
7379
fname = os.path.basename(path_or_url)
@@ -77,6 +83,8 @@ def load_icon(path_or_url, size=(18, 18)):
7783
path_or_url = fname
7884
icon = Image.open(path_or_url).resize(size, Image.LANCZOS)
7985
return ImageTk.PhotoImage(icon)
86+
87+
8088
def style_button(btn):
8189
btn.configure(
8290
bg=BUTTON_COLOR,

0 commit comments

Comments
 (0)