Compare commits

...

5 Commits

Author SHA1 Message Date
lm bed81e6d50 Left-align logo in README 2025-10-17 14:15:11 +02:00
lm 247077f5b3 Embed logo in README 2025-10-17 14:14:26 +02:00
lm 97bfe772ff Move logo to app/assets and update loader 2025-10-17 14:13:38 +02:00
lm 9093e7c835 Show application logo in custom title bar 2025-10-17 14:12:24 +02:00
lm f49a13b80e Tint navigation arrows to match theme 2025-10-17 14:07:23 +02:00
3 changed files with 23 additions and 1 deletions

View File

@ -1,5 +1,7 @@
# ICRS (Interactive Color Range Analyzer)
<img src="app/assets/logo.png" alt="ICRS Logo" width="120"/>
ICRS is a small Tkinter tool for analysing colour ranges in images. You load a picture, pick or click a reference colour, adjust hue/saturation/value sliders, and the app marks matching pixels while showing quick stats.
## Features

BIN
app/assets/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 KiB

View File

@ -328,6 +328,7 @@ class UIBuilderMixin:
def _create_navigation_button(self, container, symbol: str, command, *, column: int) -> None:
bg = self.root.cget("bg") if hasattr(self.root, "cget") else "#f2f2f7"
container.grid_rowconfigure(0, weight=1)
fg = "#f5f5f5" if getattr(self, "theme", "light") == "dark" else "#1f1f1f"
btn = tk.Button(
container,
text=symbol,
@ -338,6 +339,8 @@ class UIBuilderMixin:
background=bg,
activebackground=bg,
highlightthickness=0,
fg=fg,
activeforeground=fg,
cursor="hand2",
width=2,
)
@ -349,6 +352,23 @@ class UIBuilderMixin:
title_bar.pack(fill=tk.X, side=tk.TOP)
title_bar.pack_propagate(False)
logo = None
try:
from PIL import Image, ImageTk # type: ignore
logo_path = Path(__file__).resolve().parent / "assets" / "logo.png"
if logo_path.exists():
image = Image.open(logo_path).convert("RGBA")
image.thumbnail((26, 26))
logo = ImageTk.PhotoImage(image)
except Exception:
logo = None
if logo is not None:
logo_label = tk.Label(title_bar, image=logo, bg=bar_bg)
logo_label.image = logo # keep reference
logo_label.pack(side=tk.LEFT, padx=(10, 6), pady=4)
title_label = tk.Label(
title_bar,
text="ICRS — Interactive Color Range Analyzer",
@ -357,7 +377,7 @@ class UIBuilderMixin:
font=("Segoe UI", 11, "bold"),
anchor="w",
)
title_label.pack(side=tk.LEFT, padx=12)
title_label.pack(side=tk.LEFT, padx=6)
close_btn = tk.Button(
title_bar,