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:
@@ -14,7 +14,7 @@ from tkinter import ttk, filedialog
|
||||
import customtkinter as ctk
|
||||
|
||||
from core.i18n import t
|
||||
from core.icons import icon_text
|
||||
from core.icons import icon_text, make_icon_button
|
||||
from core.sql_client import SQLClient
|
||||
|
||||
_TREE_THEME_APPLIED = False
|
||||
@@ -227,9 +227,8 @@ class QueryTab(ctk.CTkFrame):
|
||||
btn_row = ctk.CTkFrame(right_ctk, fg_color="transparent")
|
||||
btn_row.pack(fill="x", padx=8, pady=4)
|
||||
|
||||
self._exec_btn = ctk.CTkButton(
|
||||
btn_row,
|
||||
text=icon_text("execute", t("query_execute")),
|
||||
self._exec_btn = make_icon_button(
|
||||
btn_row, "execute", t("query_execute"),
|
||||
command=self._execute_query,
|
||||
width=130,
|
||||
fg_color="#2563eb",
|
||||
@@ -237,9 +236,8 @@ class QueryTab(ctk.CTkFrame):
|
||||
)
|
||||
self._exec_btn.pack(side="left", padx=(0, 6))
|
||||
|
||||
self._clear_btn = ctk.CTkButton(
|
||||
btn_row,
|
||||
text=icon_text("clear", t("query_clear")),
|
||||
self._clear_btn = make_icon_button(
|
||||
btn_row, "clear", t("query_clear"),
|
||||
command=self._clear_all,
|
||||
width=80,
|
||||
fg_color="#6b7280",
|
||||
@@ -247,9 +245,8 @@ class QueryTab(ctk.CTkFrame):
|
||||
)
|
||||
self._clear_btn.pack(side="left", padx=(0, 6))
|
||||
|
||||
self._export_btn = ctk.CTkButton(
|
||||
btn_row,
|
||||
text=icon_text("save", t("query_export_csv")),
|
||||
self._export_btn = make_icon_button(
|
||||
btn_row, "save", t("query_export_csv"),
|
||||
command=self._export_csv,
|
||||
width=110,
|
||||
fg_color="#059669",
|
||||
|
||||
Reference in New Issue
Block a user