From 717ac72f36b55805dbcfd58eec304b1a8384f385 Mon Sep 17 00:00:00 2001 From: lm Date: Sat, 18 Oct 2025 14:53:55 +0200 Subject: [PATCH] Tweak CS2 fetch defaults Use a downward arrow icon for Fetch Images and default downloads to the project's images directory, updating subtool buttons and docs accordingly. --- README.md | 2 +- app/gui/ui.py | 2 +- app/tools/cs2_patterns.py | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 993c3c8..9c8f2c5 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ On macOS/Linux activate with `source .venv/bin/activate` instead. 3. Fine‑tune sliders; watch the overlay update on the right. 4. Toggle freehand mode (`△`) or stick with rectangles and mark areas to exclude (right mouse drag). 5. Move through folder images with `⬅️` / `➡️`; exclusions stay put unless you opt into automatic resets. -6. Fetch CS2 pattern images (`⬇`) whenever you need additional references. +6. Fetch CS2 pattern images (`⭳`) whenever you need additional references. 7. Save an overlay (`💾`) when ready. ## Project Layout diff --git a/app/gui/ui.py b/app/gui/ui.py index 247dd95..9aea191 100644 --- a/app/gui/ui.py +++ b/app/gui/ui.py @@ -26,7 +26,7 @@ class UIBuilderMixin: ("🧹", self._t("toolbar.clear_excludes"), self.clear_excludes), ("↩", self._t("toolbar.undo_exclude"), self.undo_exclude), ("🔄", self._t("toolbar.reset_sliders"), self.reset_sliders), - ("⬇", self._t("toolbar.cs2_tool"), self.open_cs2_pattern_tool), + ("⭳", self._t("toolbar.cs2_tool"), self.open_cs2_pattern_tool), ("🌓", self._t("toolbar.toggle_theme"), self.toggle_theme), ] self._toolbar_buttons: list[dict[str, object]] = [] diff --git a/app/tools/cs2_patterns.py b/app/tools/cs2_patterns.py index 1d7a869..d02593f 100644 --- a/app/tools/cs2_patterns.py +++ b/app/tools/cs2_patterns.py @@ -16,6 +16,8 @@ import requests from PIL import Image, ImageTk from urllib.parse import urlparse +from app.logic import IMAGES_DIR + class CS2PatternFetcher: """Fetch CS2 skin metadata and download pattern images.""" @@ -191,9 +193,7 @@ class CS2PatternTool(tk.Toplevel): self.weapons_var = tk.StringVar() self.patterns_var = tk.StringVar() - self.directory_var = tk.StringVar( - value=str((Path.cwd() / "images" / "cs2").resolve()) - ) + self.directory_var = tk.StringVar(value=str(IMAGES_DIR.resolve())) self.status_var = tk.StringVar(value=self._t("cs2.status_loading")) self._init_widgets() @@ -460,7 +460,7 @@ class CS2PatternTool(tk.Toplevel): def _toolbar_button_defs(self) -> list[tuple[str, str, Any]]: return [ ("🔄", self._t("cs2.refresh_button"), self._refresh_data), - ("⬇", self._t("cs2.download_button"), self._download_selected), + ("⭳", self._t("cs2.download_button"), self._download_selected), ("📁", self._t("cs2.browse_button"), self._browse_directory), ]