v1.9.1: PNG Material Design icons — 28 icons, dark/light theme, HiDPI, graceful Unicode fallback
- 56 PNG icons (28 unique × 2 color variants) from Material Design Icons (round style, 96×96px) - core/icons.py: ctk_icon(), make_icon_button(), reconfigure_icon_button() with CTkImage cache - Updated 15 GUI files: app.py, sidebar.py, server_dialog.py, all tabs - build.py: auto-include assets/icons/ in PyInstaller bundle, patch rollover at 99→minor+1 - tools/download_icons.py: icon download script - Automatic dark↔light theme switching via CTkImage dual-image support Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,7 @@ from tkinter import ttk, filedialog
|
||||
import customtkinter as ctk
|
||||
from core.s3_client import S3Client
|
||||
from core.i18n import t
|
||||
from core.icons import icon_text
|
||||
from core.icons import icon_text, make_icon_button
|
||||
from gui.tabs.query_tab import apply_dark_scrollbar_style
|
||||
|
||||
|
||||
@@ -103,32 +103,32 @@ class S3Tab(ctk.CTkFrame):
|
||||
btn_frame = ctk.CTkFrame(header, fg_color="transparent")
|
||||
btn_frame.pack(side="right")
|
||||
|
||||
self._back_btn = ctk.CTkButton(
|
||||
btn_frame, text=icon_text("back", t("s3_back")), width=80,
|
||||
self._back_btn = make_icon_button(
|
||||
btn_frame, "back", t("s3_back"), width=80,
|
||||
command=self._go_back, state="disabled",
|
||||
)
|
||||
self._back_btn.pack(side="left", padx=(0, 5))
|
||||
|
||||
self._refresh_btn = ctk.CTkButton(
|
||||
btn_frame, text=icon_text("refresh", t("s3_refresh")), width=100,
|
||||
self._refresh_btn = make_icon_button(
|
||||
btn_frame, "refresh", t("s3_refresh"), width=100,
|
||||
command=self._refresh,
|
||||
)
|
||||
self._refresh_btn.pack(side="left", padx=(0, 5))
|
||||
|
||||
self._upload_btn = ctk.CTkButton(
|
||||
btn_frame, text=icon_text("upload", t("s3_upload")), width=100,
|
||||
self._upload_btn = make_icon_button(
|
||||
btn_frame, "upload", t("s3_upload"), width=100,
|
||||
command=self._upload,
|
||||
)
|
||||
self._upload_btn.pack(side="left", padx=(0, 5))
|
||||
|
||||
self._download_btn = ctk.CTkButton(
|
||||
btn_frame, text=icon_text("download", t("s3_download")), width=110,
|
||||
self._download_btn = make_icon_button(
|
||||
btn_frame, "download", t("s3_download"), width=110,
|
||||
command=self._download,
|
||||
)
|
||||
self._download_btn.pack(side="left", padx=(0, 5))
|
||||
|
||||
self._delete_btn = ctk.CTkButton(
|
||||
btn_frame, text=icon_text("delete", t("s3_delete")), width=100,
|
||||
self._delete_btn = make_icon_button(
|
||||
btn_frame, "delete", t("s3_delete"), width=100,
|
||||
fg_color="#dc2626", hover_color="#b91c1c",
|
||||
command=self._delete,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user