From d6c73a002ce4e7f67d8a725a0bcfc51db0f149ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Sun, 5 Apr 2026 14:06:41 +0800 Subject: [PATCH 01/32] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7=E6=AF=94=E8=BE=83=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复 _parse_version 函数无法正确解析带 · 分隔符的版本号问题 - 分离主版本号和预发布标识,避免 Beta 编号被误认为是版本号第4位 - 支持 "Beta 1" 和 "Beta1" 两种数字格式 --- dialogs/update_dialog.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/dialogs/update_dialog.py b/dialogs/update_dialog.py index 4efb740..8d089d4 100644 --- a/dialogs/update_dialog.py +++ b/dialogs/update_dialog.py @@ -205,15 +205,27 @@ def _parse_version(version_str: str) -> Tuple[List[int], int, int]: 预发布版本号: Beta1/Beta2等后面的数字,默认0 """ version_str = version_str.lstrip("v").lower() - parts = re.findall(r"\d+", version_str) + + # 分离主版本号和预发布部分(处理 · 符号) + # "1.7.0 · beta 1" -> main_part="1.7.0", pre_part="beta 1" + if " · " in version_str: + main_part, pre_part = version_str.split(" · ", 1) + else: + main_part = version_str + pre_part = "" + + # 提取主版本号的数字 + parts = re.findall(r"\d+", main_part) nums = [int(p) for p in parts] if parts else [0] + # 解析预发布标识 pre_release = 0 pre_release_num = 0 for keyword, value in _PRE_RELEASE_ORDER.items(): - if keyword in version_str: + if keyword in pre_part: pre_release = value - match = re.search(rf"{keyword}(\d+)", version_str) + # 支持 "beta1" 和 "beta 1" 两种格式 + match = re.search(rf"{keyword}\s*(\d+)", pre_part) if match: pre_release_num = int(match.group(1)) break -- Gitee From 2a9d797fe5b9345bd1a5c97cbb32fba7900c9efd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Sun, 5 Apr 2026 20:45:55 +0800 Subject: [PATCH 02/32] Update build-mac.yml --- .github/workflows/build-mac.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-mac.yml b/.github/workflows/build-mac.yml index bb091b8..ee864fb 100644 --- a/.github/workflows/build-mac.yml +++ b/.github/workflows/build-mac.yml @@ -5,7 +5,6 @@ on: branches: [ main ] pull_request: branches: [ main ] - workflow_dispatch: jobs: build-macos: -- Gitee From 9d6066bec6f9961ed4f78df2f52a99e881df9863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Sun, 5 Apr 2026 20:45:58 +0800 Subject: [PATCH 03/32] Update build-windows.yml --- .github/workflows/build-windows.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 8d3252c..f3bf313 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -5,7 +5,6 @@ on: branches: [ main ] pull_request: branches: [ main ] - workflow_dispatch: jobs: build-windows: -- Gitee From 8b2bad27c143d05308dd62a57726407ca30fb3cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Sun, 5 Apr 2026 20:47:12 +0800 Subject: [PATCH 04/32] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=89=B2=E7=9B=B2=E9=A2=84=E8=A7=88=E5=AF=B9=E8=AF=9D=E6=A1=86?= =?UTF-8?q?=E6=89=93=E4=B8=8D=E5=BC=80=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改 colorblind_dialog.py 中 tr() 调用,将参数名从 text 改为 desc - 更新 ZW_JT.toml、en_US.toml、ZW_FT.toml、JA_JP.toml、FR_FR.toml、RU_RU.toml 中的占位符 - 避免与 LocaleManager._format_text() 方法的 text 参数产生命名冲突 --- dialogs/colorblind_dialog.py | 2 +- locales/FR_FR.toml | 2 +- locales/JA_JP.toml | 2 +- locales/RU_RU.toml | 2 +- locales/ZW_FT.toml | 2 +- locales/ZW_JT.toml | 2 +- locales/en_US.toml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dialogs/colorblind_dialog.py b/dialogs/colorblind_dialog.py index e0353a7..a926518 100644 --- a/dialogs/colorblind_dialog.py +++ b/dialogs/colorblind_dialog.py @@ -313,7 +313,7 @@ class ColorblindPreviewDialog(BaseFramelessDialog): # 更新说明文字 info = get_colorblind_info(self._current_type) - self.description_label.setText(tr('dialogs.colorblind.description', text=info['description'])) + self.description_label.setText(tr('dialogs.colorblind.description', desc=info['description'])) def closeEvent(self, event): """关闭事件""" diff --git a/locales/FR_FR.toml b/locales/FR_FR.toml index 8aa8766..bb22fe5 100644 --- a/locales/FR_FR.toml +++ b/locales/FR_FR.toml @@ -317,7 +317,7 @@ original_color = "Couleur originale" simulated_color = "Couleur simulée" original = "Original" simulated = "Simulé" -description = "Note: {text}" +description = "Note: {desc}" [dialogs.contrast] title = "Vérification du contraste" diff --git a/locales/JA_JP.toml b/locales/JA_JP.toml index e2895c6..627e9d2 100644 --- a/locales/JA_JP.toml +++ b/locales/JA_JP.toml @@ -317,7 +317,7 @@ original_color = "元のカラー" simulated_color = "シミュレートカラー" original = "元" simulated = "シミュレート" -description = "注: {text}" +description = "注: {desc}" [dialogs.contrast] title = "コントラストチェック" diff --git a/locales/RU_RU.toml b/locales/RU_RU.toml index 7ee3032..94ceeb0 100644 --- a/locales/RU_RU.toml +++ b/locales/RU_RU.toml @@ -318,7 +318,7 @@ original_color = "Исходный цвет" simulated_color = "Симулированный цвет" original = "Исходный" simulated = "Симулированный" -description = "Примечание: {text}" +description = "Примечание: {desc}" [dialogs.contrast] title = "Проверка контраста" diff --git a/locales/ZW_FT.toml b/locales/ZW_FT.toml index 310231d..a41d7a6 100644 --- a/locales/ZW_FT.toml +++ b/locales/ZW_FT.toml @@ -317,7 +317,7 @@ original_color = "原顏色" simulated_color = "模擬顏色" original = "原始" simulated = "模擬" -description = "說明: {text}" +description = "說明: {desc}" [dialogs.contrast] title = "對比度檢查" diff --git a/locales/ZW_JT.toml b/locales/ZW_JT.toml index a6762c8..53d3424 100644 --- a/locales/ZW_JT.toml +++ b/locales/ZW_JT.toml @@ -317,7 +317,7 @@ original_color = "原颜色" simulated_color = "模拟颜色" original = "原始" simulated = "模拟" -description = "说明: {text}" +description = "说明: {desc}" [dialogs.contrast] title = "对比度检查" diff --git a/locales/en_US.toml b/locales/en_US.toml index 68163c4..caaf536 100644 --- a/locales/en_US.toml +++ b/locales/en_US.toml @@ -317,7 +317,7 @@ original_color = "Original" simulated_color = "Simulated" original = "Original" simulated = "Simulated" -description = "Note: {text}" +description = "Note: {desc}" [dialogs.contrast] title = "Contrast Check" -- Gitee From d82e9ba8abed5a9cdb907cf7b0f2d2545a6c08b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Sun, 5 Apr 2026 21:04:17 +0800 Subject: [PATCH 05/32] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E5=AF=B9=E6=AF=94?= =?UTF-8?q?=E5=BA=A6=E6=A3=80=E6=9F=A5=E5=AF=B9=E8=AF=9D=E6=A1=86=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E9=AB=98=E5=BA=A6=E4=B8=8D=E8=B6=B3=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E6=97=B6=E7=BC=A9=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将窗口高度从 580 增加到 640,确保容纳所有控件 - 移除过度设计的 resizeEvent 防御代码 - 恢复简洁的初始化顺序 --- dialogs/contrast_dialog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dialogs/contrast_dialog.py b/dialogs/contrast_dialog.py index 2f03647..fecaba1 100644 --- a/dialogs/contrast_dialog.py +++ b/dialogs/contrast_dialog.py @@ -355,8 +355,8 @@ class ContrastCheckDialog(BaseFramelessDialog): # 设置窗口图标 self.setWindowIcon(load_icon_universal()) - # 设置固定大小 - self.setFixedSize(480, 580) + # 设置固定大小(高度640确保容纳所有控件) + self.setFixedSize(480, 640) # 设置界面 self.setup_ui() -- Gitee From bf112cee53f121f647dd6df8f7ab3b6054ae4c15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Wed, 8 Apr 2026 21:44:30 +0800 Subject: [PATCH 06/32] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=85=8D=E8=89=B2=E9=A2=84=E8=A7=88=E9=9D=A2=E6=9D=BFSVG?= =?UTF-8?q?=E7=BC=A9=E6=94=BE=E5=92=8C=E5=B8=83=E5=B1=80=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复窗口最大化/恢复时SVG无法正确填充显示区域的问题 - 将模板加载从构造函数延迟到showEvent,确保尺寸计算正确 - 优化ScrollVLayout尺寸更新逻辑,使用延迟更新确保视口稳定 - 增加GridLayout行拉伸设置,确保网格布局高度均匀分配 - 提取重复的模板信息解析逻辑到BaseLayout._get_template_info辅助函数 - 清理过度防御性代码,移除冗余的hasattr检查和update调用 - 统一所有布局类的SVG控件最小尺寸为200x200,网格布局为250x350 --- ui/color_preview.py | 157 ++++++++++++++++++++++++++++---------------- 1 file changed, 100 insertions(+), 57 deletions(-) diff --git a/ui/color_preview.py b/ui/color_preview.py index ca2a6ca..370ec39 100644 --- a/ui/color_preview.py +++ b/ui/color_preview.py @@ -600,6 +600,7 @@ class SVGPreviewWidget(BasePreviewScene): self._is_builtin: bool = False self._template_path: Optional[str] = None + self._preview_service: Optional[PreviewService] = None self.setStyleSheet("border: none; background: transparent;") @@ -819,7 +820,7 @@ class SVGPreviewWidget(BasePreviewScene): def _has_fixed_background_element(self) -> bool: """检查SVG是否有固定颜色的背景元素""" - if not hasattr(self, '_preview_service') or self._preview_service is None: + if self._preview_service is None: self._preview_service = PreviewService() return self._preview_service.has_fixed_background_element(self._svg_content) @@ -907,6 +908,20 @@ class BaseLayout(QWidget): """ self.template_deleted.emit(template_path) + @staticmethod + def _get_template_info(template_info): + """解析模板信息 + + Args: + template_info: 模板信息(字典或字符串) + + Returns: + tuple: (path, is_builtin) + """ + if isinstance(template_info, dict): + return template_info.get("path"), template_info.get("is_builtin", False) + return template_info, False + class SingleLayout(BaseLayout): """单图布局 - 一次显示一个SVG,支持左右切换""" @@ -915,7 +930,7 @@ class SingleLayout(BaseLayout): super().__init__(templates, config, parent) self._current_index: int = 0 self.setup_ui() - self.load_templates() + # load_templates 延迟到 showEvent 中调用 def setup_ui(self): main_layout = QVBoxLayout(self) @@ -951,18 +966,21 @@ class SingleLayout(BaseLayout): main_layout.addWidget(nav_widget) self.update_navigation() + def showEvent(self, event): + """首次显示时加载模板""" + super().showEvent(event) + if not self._svg_widgets: + self.load_templates() + self.set_colors(self._colors) + def load_templates(self): self.clear() for template_info in self._templates: - if isinstance(template_info, dict): - path = template_info.get("path") - is_builtin = template_info.get("is_builtin", False) - else: - path = template_info - is_builtin = False - + path, is_builtin = self._get_template_info(template_info) svg_widget = self._create_svg_widget(path, is_builtin) + svg_widget.setMinimumSize(200, 200) + svg_widget.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding) self._svg_widgets.append(svg_widget) self._show_current_svg() @@ -1057,7 +1075,7 @@ class ScrollVLayout(BaseLayout): def __init__(self, templates: List[str], config: Dict[str, Any], parent=None): super().__init__(templates, config, parent) self.setup_ui() - self.load_templates() + # load_templates 延迟到 showEvent 中调用 def setup_ui(self): main_layout = QVBoxLayout(self) @@ -1081,31 +1099,39 @@ class ScrollVLayout(BaseLayout): self._scroll_area.setWidget(self._content_widget) main_layout.addWidget(self._scroll_area) + def showEvent(self, event): + """首次显示时加载模板""" + super().showEvent(event) + if not self._svg_widgets: + self.load_templates() + self.set_colors(self._colors) + def load_templates(self): self.clear() viewport_height = self._scroll_area.viewport().height() + # 如果视口高度无效,使用父控件高度或默认值 + if viewport_height <= 0: + viewport_height = self.height() if self.height() > 0 else 400 for template_info in self._templates: - if isinstance(template_info, dict): - path = template_info.get("path") - is_builtin = template_info.get("is_builtin", False) - else: - path = template_info - is_builtin = False - + path, is_builtin = self._get_template_info(template_info) svg_widget = self._create_svg_widget(path, is_builtin) - svg_widget.setMinimumHeight(viewport_height) + svg_widget.setFixedHeight(viewport_height) self._svg_widgets.append(svg_widget) self._content_layout.insertWidget(self._content_layout.count() - 1, svg_widget) def resizeEvent(self, event): super().resizeEvent(event) - if hasattr(self, '_scroll_area'): - viewport_height = self._scroll_area.viewport().height() - for svg_widget in self._svg_widgets: - svg_widget.setMinimumHeight(viewport_height) - svg_widget.update() + # 延迟更新尺寸,确保 ScrollArea 视口已稳定 + QTimer.singleShot(0, self._update_svg_sizes) + + def _update_svg_sizes(self): + """更新 SVG 控件尺寸""" + viewport_height = self._scroll_area.viewport().height() + for svg_widget in self._svg_widgets: + svg_widget.setFixedHeight(max(viewport_height, 200)) + svg_widget.update() class ScrollHLayout(BaseLayout): @@ -1114,7 +1140,7 @@ class ScrollHLayout(BaseLayout): def __init__(self, templates: list, config: dict, parent=None): super().__init__(templates, config, parent) self.setup_ui() - self.load_templates() + # load_templates 延迟到 showEvent 中调用 def setup_ui(self): main_layout = QHBoxLayout(self) @@ -1138,17 +1164,18 @@ class ScrollHLayout(BaseLayout): self._scroll_area.setWidget(self._content_widget) main_layout.addWidget(self._scroll_area) + def showEvent(self, event): + """首次显示时加载模板""" + super().showEvent(event) + if not self._svg_widgets: + self.load_templates() + self.set_colors(self._colors) + def load_templates(self): self.clear() for template_info in self._templates: - if isinstance(template_info, dict): - path = template_info.get("path") - is_builtin = template_info.get("is_builtin", False) - else: - path = template_info - is_builtin = False - + path, is_builtin = self._get_template_info(template_info) svg_widget = self._create_svg_widget(path, is_builtin) svg_widget.setMinimumWidth(200) self._svg_widgets.append(svg_widget) @@ -1162,7 +1189,7 @@ class GridLayout(BaseLayout): super().__init__(templates, config, parent) self._columns: int = config.get('columns', 2) self.setup_ui() - self.load_templates() + # load_templates 延迟到 showEvent 中调用 def setup_ui(self): main_layout = QVBoxLayout(self) @@ -1185,19 +1212,21 @@ class GridLayout(BaseLayout): self._scroll_area.setWidget(self._content_widget) main_layout.addWidget(self._scroll_area) + def showEvent(self, event): + """首次显示时加载模板""" + super().showEvent(event) + if not self._svg_widgets: + self.load_templates() + self.set_colors(self._colors) + def load_templates(self): self.clear() for index, template_info in enumerate(self._templates): - if isinstance(template_info, dict): - path = template_info.get("path") - is_builtin = template_info.get("is_builtin", False) - else: - path = template_info - is_builtin = False - + path, is_builtin = self._get_template_info(template_info) svg_widget = self._create_svg_widget(path, is_builtin) - svg_widget.setMinimumSize(150, 150) + svg_widget.setMinimumSize(250, 350) + svg_widget.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding) self._svg_widgets.append(svg_widget) row = index // self._columns @@ -1207,6 +1236,11 @@ class GridLayout(BaseLayout): for col in range(self._columns): self._content_layout.setColumnStretch(col, 1) + # 设置行拉伸,确保行高度均匀分配 + row_count = (len(self._templates) + self._columns - 1) // self._columns + for row in range(row_count): + self._content_layout.setRowStretch(row, 1) + class MixedLayout(BaseLayout): """混合布局 - 左侧2x2网格 + 右侧大图""" @@ -1214,7 +1248,7 @@ class MixedLayout(BaseLayout): def __init__(self, templates: List[str], config: Dict[str, Any], parent=None): super().__init__(templates, config, parent) self.setup_ui() - self.load_templates() + # load_templates 延迟到 showEvent 中调用 def setup_ui(self): main_layout = QHBoxLayout(self) @@ -1235,18 +1269,22 @@ class MixedLayout(BaseLayout): main_layout.addWidget(self._left_widget, stretch=1) main_layout.addWidget(self._right_widget, stretch=1) + def showEvent(self, event): + """首次显示时加载模板""" + super().showEvent(event) + if not self._svg_widgets: + self.load_templates() + self.set_colors(self._colors) + def load_templates(self): self.clear() - def get_template_info(template_info): - if isinstance(template_info, dict): - return template_info.get("path"), template_info.get("is_builtin", False) - return template_info, False - grid_templates = self._templates[:4] for index, template_info in enumerate(grid_templates): - path, is_builtin = get_template_info(template_info) + path, is_builtin = self._get_template_info(template_info) svg_widget = self._create_svg_widget(path, is_builtin) + svg_widget.setMinimumSize(200, 200) + svg_widget.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding) self._svg_widgets.append(svg_widget) row = index // 2 @@ -1266,8 +1304,10 @@ class MixedLayout(BaseLayout): right_template_info = None if right_template_info: - path, is_builtin = get_template_info(right_template_info) + path, is_builtin = self._get_template_info(right_template_info) svg_widget = self._create_svg_widget(path, is_builtin) + svg_widget.setMinimumSize(200, 200) + svg_widget.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding) self._svg_widgets.append(svg_widget) self._right_layout.addWidget(svg_widget) @@ -1452,6 +1492,7 @@ class MixedPreviewPanel(QWidget): """ self._current_scene = scene + # 先清理旧布局 if self._current_layout: self._current_layout.deleteLater() self._current_layout = None @@ -1460,6 +1501,11 @@ class MixedPreviewPanel(QWidget): self._svg_preview.deleteLater() self._svg_preview = None + # 使用 QTimer 延迟创建新布局,避免事件循环阻塞 + QTimer.singleShot(10, lambda: self._create_scene_layout(scene)) + + def _create_scene_layout(self, scene: str): + """创建场景布局(延迟执行)""" try: manager = self._get_preview_service()._get_scene_type_manager() scene_config = manager.get_scene_type_by_id(scene) @@ -1488,9 +1534,9 @@ class MixedPreviewPanel(QWidget): if self._current_layout: self._main_layout.addWidget(self._current_layout) - self._current_layout.set_colors(self._colors) self._current_layout.template_deleted.connect(self._on_template_deleted) - QTimer.singleShot(100, self._update_layout_sizes) + # 延迟加载模板并设置颜色,确保布局已稳定 + QTimer.singleShot(50, lambda: self._init_layout_colors(self._current_layout)) except Exception as e: logger.error(f"创建布局失败: {e}", exc_info=True) @@ -1525,13 +1571,10 @@ class MixedPreviewPanel(QWidget): self._main_layout.addWidget(self._svg_preview) self._current_layout = None - def _update_layout_sizes(self): - """更新布局中所有SVG控件的大小""" - if self._current_layout and hasattr(self._current_layout, '_scroll_area'): - viewport_height = self._current_layout._scroll_area.viewport().height() - for svg_widget in self._current_layout.get_svg_widgets(): - svg_widget.setMinimumHeight(viewport_height) - svg_widget.update() + def _init_layout_colors(self, layout): + """初始化布局颜色(延迟执行)""" + if layout == self._current_layout: + layout.set_colors(self._colors) def set_colors(self, colors: List[str]): """设置配色 -- Gitee From d2f2e8e2e221261214783c5f398fcfeba2fc737f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Fri, 10 Apr 2026 16:10:11 +0800 Subject: [PATCH 07/32] =?UTF-8?q?[=E5=86=85=E5=AE=B9=E8=B0=83=E6=95=B4]=20?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-windows.yml | 2 +- version.py | 4 ++-- version.txt | 6 +++--- version_info.txt | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index f3bf313..eaf0261 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -2,7 +2,7 @@ name: Build Windows App with Nuitka on: push: - branches: [ main ] + branches: [ main, Dev ] pull_request: branches: [ main ] diff --git a/version.py b/version.py index 2c87a65..19fd09d 100644 --- a/version.py +++ b/version.py @@ -9,9 +9,9 @@ class VersionManager: # 版本号组件 self.major: int = 1 self.minor: int = 7 - self.patch: int = 0 + self.patch: int = 1 self.build: int = 0 - self.prerelease: str = "" + self.prerelease: str = " · Beta" # 核心版本信息 self.version: str = f"{self.major}.{self.minor}.{self.patch}{self.prerelease}" diff --git a/version.txt b/version.txt index 3867730..06fcb19 100644 --- a/version.txt +++ b/version.txt @@ -1,6 +1,6 @@ -1.7.0 -2026.4.4.1 -1.7.0.0 +1.7.1 · Beta +2026.4.10.1 +1.7.1.Beta 浮晓 HXiao Studio © 2026 浮晓 HXiao Studio 取色卡 - Color Card \ No newline at end of file diff --git a/version_info.txt b/version_info.txt index 688dfd2..b38d356 100644 --- a/version_info.txt +++ b/version_info.txt @@ -1,7 +1,7 @@ VSVersionInfo( ffi=FixedFileInfo( - filevers=(2026,4,4,1), - prodvers=(1,7,0,0), + filevers=(2026,4,10,1), + prodvers=(1,7,1,Beta), mask=0x3f, flags=0x0, OS=0x4, @@ -17,12 +17,12 @@ VSVersionInfo( [ StringStruct(u'CompanyName', u'浮晓 HXiao Studio'), StringStruct(u'FileDescription', u'取色卡 - Color Card'), - StringStruct(u'FileVersion', u'1.7.0'), + StringStruct(u'FileVersion', u'1.7.1.Beta'), StringStruct(u'InternalName', u'Color_Card'), StringStruct(u'LegalCopyright', u'© 2026 浮晓 HXiao Studio'), StringStruct(u'OriginalFilename', u'Color_Card.exe'), StringStruct(u'ProductName', u'取色卡'), - StringStruct(u'ProductVersion', u'1.7.0'), + StringStruct(u'ProductVersion', u'1.7.1'), StringStruct(u'Comments', u'一站式的图片的图片分析和配色工具') ] ) -- Gitee From c2da0efd681ad1d5da098f22bd5ae45f0afa66e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Fri, 10 Apr 2026 16:17:45 +0800 Subject: [PATCH 08/32] =?UTF-8?q?[=E5=86=85=E5=AE=B9=E8=B0=83=E6=95=B4]=20?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- version.txt | 2 +- version_info.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/version.txt b/version.txt index 06fcb19..8955dad 100644 --- a/version.txt +++ b/version.txt @@ -1,6 +1,6 @@ 1.7.1 · Beta 2026.4.10.1 -1.7.1.Beta +1.7.1.0 浮晓 HXiao Studio © 2026 浮晓 HXiao Studio 取色卡 - Color Card \ No newline at end of file diff --git a/version_info.txt b/version_info.txt index b38d356..59b0cdf 100644 --- a/version_info.txt +++ b/version_info.txt @@ -1,7 +1,7 @@ VSVersionInfo( ffi=FixedFileInfo( filevers=(2026,4,10,1), - prodvers=(1,7,1,Beta), + prodvers=(1,7,1,0), mask=0x3f, flags=0x0, OS=0x4, @@ -17,7 +17,7 @@ VSVersionInfo( [ StringStruct(u'CompanyName', u'浮晓 HXiao Studio'), StringStruct(u'FileDescription', u'取色卡 - Color Card'), - StringStruct(u'FileVersion', u'1.7.1.Beta'), + StringStruct(u'FileVersion', u'1.7.1'), StringStruct(u'InternalName', u'Color_Card'), StringStruct(u'LegalCopyright', u'© 2026 浮晓 HXiao Studio'), StringStruct(u'OriginalFilename', u'Color_Card.exe'), -- Gitee From 65155bf1a5bd1c84cac8a1fbe74b864cb81a615c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Fri, 10 Apr 2026 17:09:47 +0800 Subject: [PATCH 09/32] =?UTF-8?q?[=E4=BC=98=E5=8C=96]=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=20cityscape.svg=20=E5=92=8C=20cosmos.svg=20=E7=9A=84=E5=8F=8C?= =?UTF-8?q?=E5=B1=82=E8=83=8C=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 删除 cityscape.svg 中 `id="sky"` 的第二层背景矩形 - 保留单层 `class="background"` 背景元素,避免主题切换时重复替换 - cosmos.svg 已同步调整,移除冗余背景层 --- scenes_data/illustration/cityscape.svg | 3 --- scenes_data/illustration/cosmos.svg | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/scenes_data/illustration/cityscape.svg b/scenes_data/illustration/cityscape.svg index 1131c15..a6ceac1 100644 --- a/scenes_data/illustration/cityscape.svg +++ b/scenes_data/illustration/cityscape.svg @@ -1,9 +1,6 @@ - - - diff --git a/scenes_data/illustration/cosmos.svg b/scenes_data/illustration/cosmos.svg index 3419058..07f8b92 100644 --- a/scenes_data/illustration/cosmos.svg +++ b/scenes_data/illustration/cosmos.svg @@ -2,7 +2,7 @@ - + -- Gitee From 96806768f98d1b9308ba4863c376feab2d0c2aea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Fri, 10 Apr 2026 17:11:25 +0800 Subject: [PATCH 10/32] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E5=B0=86=E8=A6=86?= =?UTF-8?q?=E7=9B=96=E6=A3=80=E6=B5=8B=E9=80=BB=E8=BE=91=E9=99=90=E5=88=B6?= =?UTF-8?q?=E5=9C=A8=E6=99=BA=E8=83=BD=E6=98=A0=E5=B0=84=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=B8=8B=E6=89=A7=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 _detect_covered_elements() 从 SVG 解析初始化移到 _apply_smart_mapping() 方法中 - 移除 _apply_color_map_extended() 中的 is_covered 检查逻辑 - 语义化映射不再跳过被覆盖的元素,完全尊重用户标记的 class 属性 - 智能映射保留覆盖检测,避免给不可见元素分配颜色 --- core/svg_color_mapper.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/core/svg_color_mapper.py b/core/svg_color_mapper.py index 63704d3..bd21450 100644 --- a/core/svg_color_mapper.py +++ b/core/svg_color_mapper.py @@ -188,8 +188,6 @@ class SVGColorMapper: self._original_content = self._element_tree_to_string(root) self._elements.sort(key=lambda x: x.area, reverse=True) - - self._detect_covered_elements() except ET.ParseError as e: print(f"SVG 解析错误: {e}") @@ -693,6 +691,9 @@ class SVGColorMapper: if not colors or not self._original_content: return self._original_content + # 智能映射模式下执行覆盖检测 + self._detect_covered_elements() + color_map: Dict[str, str] = {} # 收集所有可见元素(跳过被完全覆盖的) @@ -845,10 +846,10 @@ class SVGColorMapper: bg_color = color_map[TRANSPARENT_BACKGROUND_KEY] self._add_background_rect(root, bg_color) - # 2. 处理透明元素(跳过被完全覆盖的元素) + # 2. 处理透明元素 transparent_index = 0 for elem_info in self._elements: - if elem_info.is_transparent and not elem_info.is_covered: + if elem_info.is_transparent: elem = self._find_element_by_id(root, elem_info.element_id) if elem is not None: key = f'{TRANSPARENT_ELEMENT_PREFIX}_{transparent_index}' @@ -857,9 +858,9 @@ class SVGColorMapper: elem.set('fill', color_map[key]) transparent_index += 1 - # 3. 处理有 fill 的元素(跳过被完全覆盖的元素) + # 3. 处理有 fill 的元素 for elem_info in self._elements: - if elem_info.fill_color and not elem_info.is_transparent and not elem_info.is_covered: + if elem_info.fill_color and not elem_info.is_transparent: elem = self._find_element_by_id(root, elem_info.element_id) if elem is not None: normalized = self._normalize_color(elem_info.fill_color) -- Gitee From 803df1d0a0daa867c0bfcd80490fe91f0017b9e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Fri, 10 Apr 2026 17:17:55 +0800 Subject: [PATCH 11/32] =?UTF-8?q?[=E4=BC=98=E5=8C=96]=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=20cosmos.svg=20=E5=92=8C=20cityscape.svg=20=E7=9A=84=E5=8F=8C?= =?UTF-8?q?=E5=B1=82=E8=83=8C=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scenes_data/illustration/cosmos.svg | 3 --- 1 file changed, 3 deletions(-) diff --git a/scenes_data/illustration/cosmos.svg b/scenes_data/illustration/cosmos.svg index 07f8b92..7dc2c95 100644 --- a/scenes_data/illustration/cosmos.svg +++ b/scenes_data/illustration/cosmos.svg @@ -1,9 +1,6 @@ - - - -- Gitee From 2aca288cd7b8619149e6ad0626b2a627db24c314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Fri, 10 Apr 2026 17:22:32 +0800 Subject: [PATCH 12/32] =?UTF-8?q?[=E4=BC=98=E5=8C=96]=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=20ocean.svg=20=E5=92=8C=20tropical.svg=20=E7=9A=84=E5=8F=8C?= =?UTF-8?q?=E5=B1=82=E8=83=8C=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scenes_data/illustration/ocean.svg | 3 --- scenes_data/illustration/tropical.svg | 3 --- 2 files changed, 6 deletions(-) diff --git a/scenes_data/illustration/ocean.svg b/scenes_data/illustration/ocean.svg index cb41f1c..74b4297 100644 --- a/scenes_data/illustration/ocean.svg +++ b/scenes_data/illustration/ocean.svg @@ -1,9 +1,6 @@ - - - diff --git a/scenes_data/illustration/tropical.svg b/scenes_data/illustration/tropical.svg index 140d45a..49bfc45 100644 --- a/scenes_data/illustration/tropical.svg +++ b/scenes_data/illustration/tropical.svg @@ -1,9 +1,6 @@ - - - -- Gitee From 50f4edcdb373e4d061e06fc263767ccb044545f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Fri, 10 Apr 2026 20:38:40 +0800 Subject: [PATCH 13/32] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20SVG=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E5=8C=BA=E5=9F=9F=E9=80=8F=E6=98=8E=E8=83=8C=E6=99=AF?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复语义化映射模式下透明背景检测逻辑 - 统一智能映射和语义化映射的透明背景处理 - 优化paintEvent中背景绘制逻辑 - 移除冗余的容器透明背景设置 - 精简代码,移除未使用的has_fixed_background_element方法 --- core/preview_service.py | 28 ----------------- ui/color_preview.py | 67 +++++++++++++++++++++++++++++------------ 2 files changed, 48 insertions(+), 47 deletions(-) diff --git a/core/preview_service.py b/core/preview_service.py index 54a490d..e7ed935 100644 --- a/core/preview_service.py +++ b/core/preview_service.py @@ -327,34 +327,6 @@ class PreviewService(QObject): logger.error(f"添加SVG背景失败: bg_color={bg_color}, error={e}", exc_info=True) return svg_content - def has_fixed_background_element(self, svg_content: str) -> bool: - """检查SVG是否有固定颜色的背景元素 - - Args: - svg_content: SVG 内容 - - Returns: - bool: 是否有固定背景元素 - """ - if not svg_content: - return False - - try: - import xml.etree.ElementTree as ET - - root = ET.fromstring(svg_content) - - for elem in root.iter(): - tag = elem.tag.split('}')[-1] if '}' in elem.tag else elem.tag - if tag == 'rect': - fixed_color = elem.get('data-fixed-color') - if fixed_color == 'original': - return True - return False - except Exception as e: - logger.error(f"检查固定背景元素失败: error={e}", exc_info=True) - return False - def extract_hex_colors_from_favorite(self, favorite: Dict[str, Any]) -> List[str]: """从收藏数据中提取 HEX 颜色列表 diff --git a/ui/color_preview.py b/ui/color_preview.py index 370ec39..d7ea77d 100644 --- a/ui/color_preview.py +++ b/ui/color_preview.py @@ -33,6 +33,7 @@ from qfluentwidgets import ( # 项目模块导入 from core import get_config_manager, PreviewService, get_svg_color_mapper, get_scene_type_manager from core.color import get_color_info +from core.svg_color_mapper import ElementType from core.logger import get_logger, log_user_action from dialogs.edit_palette import EditPaletteDialog from dialogs.export_settings_dialog import ExportSettingsDialog @@ -602,7 +603,9 @@ class SVGPreviewWidget(BasePreviewScene): self._template_path: Optional[str] = None self._preview_service: Optional[PreviewService] = None - self.setStyleSheet("border: none; background: transparent;") + self.setStyleSheet("border: none;") + self.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground) + self.setAutoFillBackground(False) def set_template_info(self, is_builtin: bool, path: str = None): """设置模板信息 @@ -770,14 +773,21 @@ class SVGPreviewWidget(BasePreviewScene): has_semantic = self._color_mapper and self._color_mapper.has_semantic_types() if has_semantic: - # 语义化映射模式:检查是否有固定背景元素 - has_fixed_background = self._has_fixed_background_element() - bg_color = QColor("#ffffff") if has_fixed_background else QColor(self._colors[0]) + # 语义化映射模式:检查背景元素状态 + bg_color = self._get_semantic_background_color() + else: + # 智能映射模式:使用透明背景,让主题色透过来 + bg_color = QColor(0, 0, 0, 0) + + # 根据背景类型处理 + if bg_color.alpha() == 0: + # 透明背景:清除整个控件区域,让父控件背景透过来 + painter.setCompositionMode(QPainter.CompositionMode.CompositionMode_Clear) + painter.eraseRect(self.rect()) + painter.setCompositionMode(QPainter.CompositionMode.CompositionMode_SourceOver) else: - # 智能映射模式(含透明元素):使用白色背景 - # 因为透明背景现在由 SVG 内部处理 - bg_color = QColor("#ffffff") - painter.fillRect(self.rect(), bg_color) + # 非透明背景:填充背景色 + painter.fillRect(self.rect(), bg_color) if self._svg_renderer and self._svg_renderer.isValid(): view_box = self._svg_renderer.viewBox() @@ -818,16 +828,36 @@ class SVGPreviewWidget(BasePreviewScene): """是否处于模板模式""" return self._template_mode - def _has_fixed_background_element(self) -> bool: - """检查SVG是否有固定颜色的背景元素""" - if self._preview_service is None: - self._preview_service = PreviewService() - return self._preview_service.has_fixed_background_element(self._svg_content) + def _get_semantic_background_color(self) -> QColor: + """获取语义化映射模式的背景颜色 + + Returns: + QColor: 背景颜色(透明、白色或配色第一个颜色) + """ + if not self._color_mapper: + return QColor("#ffffff") + + for elem_info in self._color_mapper.get_elements(): + if elem_info.element_type == ElementType.BACKGROUND: + if elem_info.fixed_color == 'original': + # 检查原始 fill 值是否透明 + fill = elem_info.attributes.get('fill', '').lower() + if fill in ('transparent', 'none'): + return QColor(0, 0, 0, 0) + return QColor("#ffffff") + elif elem_info.fixed_color == 'black': + return QColor("#ffffff") + else: + return QColor(self._colors[0]) + + return QColor(self._colors[0]) def _draw_empty_hint(self, painter: QPainter): """绘制空配色提示""" - bg_color = QColor(240, 240, 240) if not isDarkTheme() else QColor(50, 50, 50) - painter.fillRect(self.rect(), bg_color) + # 使用透明背景,让主题色透过来 + painter.setCompositionMode(QPainter.CompositionMode.CompositionMode_Clear) + painter.eraseRect(self.rect()) + painter.setCompositionMode(QPainter.CompositionMode.CompositionMode_SourceOver) text_color = get_text_color() painter.setPen(QPen(text_color)) @@ -857,6 +887,7 @@ class BaseLayout(QWidget): self.setMinimumSize(200, 200) self.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding) + self.setStyleSheet("background: transparent;") def set_colors(self, colors: List[str]): self._colors = colors.copy() if colors else [] @@ -1086,7 +1117,6 @@ class ScrollVLayout(BaseLayout): self._scroll_area.setStyleSheet("QScrollArea { border: none; }") corner_widget = QWidget() - corner_widget.setStyleSheet("background: transparent;") self._scroll_area.setCornerWidget(corner_widget) self._content_widget = QWidget() @@ -1151,7 +1181,6 @@ class ScrollHLayout(BaseLayout): self._scroll_area.setStyleSheet("QScrollArea { border: none; }") corner_widget = QWidget() - corner_widget.setStyleSheet("background: transparent;") self._scroll_area.setCornerWidget(corner_widget) self._content_widget = QWidget() @@ -1200,11 +1229,9 @@ class GridLayout(BaseLayout): self._scroll_area.setStyleSheet("QScrollArea { border: none; }") corner_widget = QWidget() - corner_widget.setStyleSheet("background: transparent;") self._scroll_area.setCornerWidget(corner_widget) self._content_widget = QWidget() - self._content_widget.setStyleSheet("background: transparent;") self._content_layout = QGridLayout(self._content_widget) self._content_layout.setContentsMargins(10, 10, 10, 10) self._content_layout.setSpacing(15) @@ -1829,6 +1856,8 @@ class ColorPreviewInterface(QWidget): def setup_ui(self): """设置界面布局""" + self.setStyleSheet("background: transparent;") + layout = QVBoxLayout(self) layout.setContentsMargins(20, 20, 20, 20) layout.setSpacing(15) -- Gitee From 52d551bcab5f46cff61301421e12e1dc3f6338e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Fri, 10 Apr 2026 21:47:02 +0800 Subject: [PATCH 14/32] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=20requirements.txt=20=E4=BE=9D=E8=B5=96=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - PySide6-Fluent-Widgets: >=1.0.0 → >=1.11.1 - PySideSix-Frameless-Window: >=0.1.0 → >=0.8.0 - Pillow: >=9.0.0 → >=12.1.1 - requests: >=2.32.0 → >=2.32.5 - numpy: >=1.21.0 → >=2.4.2 --- requirements.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements.txt b/requirements.txt index 0dd710e..bbbc0af 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ PySide6~=6.10.2 -PySide6-Fluent-Widgets>=1.0.0 -PySideSix-Frameless-Window>=0.1.0 -Pillow>=9.0.0 -requests>=2.32.0 -numpy>=1.21.0 +PySide6-Fluent-Widgets>=1.11.1 +PySideSix-Frameless-Window>=0.8.0 +Pillow>=12.1.1 +requests>=2.32.5 +numpy>=2.4.2 -- Gitee From 2bf5800eebfcac6ea1922842b7479b9773c1fe02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Fri, 10 Apr 2026 21:50:14 +0800 Subject: [PATCH 15/32] =?UTF-8?q?[=E5=86=85=E5=AE=B9=E8=B0=83=E6=95=B4]=20?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- version.txt | 2 +- version_info.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/version.txt b/version.txt index 8955dad..a7d708b 100644 --- a/version.txt +++ b/version.txt @@ -1,5 +1,5 @@ 1.7.1 · Beta -2026.4.10.1 +2026.4.10.2 1.7.1.0 浮晓 HXiao Studio © 2026 浮晓 HXiao Studio diff --git a/version_info.txt b/version_info.txt index 59b0cdf..749e51e 100644 --- a/version_info.txt +++ b/version_info.txt @@ -1,6 +1,6 @@ VSVersionInfo( ffi=FixedFileInfo( - filevers=(2026,4,10,1), + filevers=(2026,4,10,2), prodvers=(1,7,1,0), mask=0x3f, flags=0x0, -- Gitee From 6ea8513bfa20ba04c9ca3ad0a80198fa6bf3c3a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Fri, 10 Apr 2026 23:10:06 +0800 Subject: [PATCH 16/32] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20SVG=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E5=8C=BA=E5=9F=9F=E8=83=8C=E6=99=AF=E8=89=B2=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改透明背景填充逻辑,浅色模式显示白色,深色模式显示#2a2a2a - 优化paintEvent中背景绘制流程 - 设置GridLayout间隔区域透明,显示主题色 - 移除冗余的透明背景属性设置 - 精简代码,移除未使用的has_fixed_background_element方法 --- ui/color_preview.py | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/ui/color_preview.py b/ui/color_preview.py index d7ea77d..85ca0a6 100644 --- a/ui/color_preview.py +++ b/ui/color_preview.py @@ -604,8 +604,6 @@ class SVGPreviewWidget(BasePreviewScene): self._preview_service: Optional[PreviewService] = None self.setStyleSheet("border: none;") - self.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground) - self.setAutoFillBackground(False) def set_template_info(self, is_builtin: bool, path: str = None): """设置模板信息 @@ -781,10 +779,9 @@ class SVGPreviewWidget(BasePreviewScene): # 根据背景类型处理 if bg_color.alpha() == 0: - # 透明背景:清除整个控件区域,让父控件背景透过来 - painter.setCompositionMode(QPainter.CompositionMode.CompositionMode_Clear) - painter.eraseRect(self.rect()) - painter.setCompositionMode(QPainter.CompositionMode.CompositionMode_SourceOver) + # 透明背景:填充纯色背景(浅色模式白色,深色模式深灰色) + solid_bg = QColor("#ffffff") if not isDarkTheme() else QColor("#2a2a2a") + painter.fillRect(self.rect(), solid_bg) else: # 非透明背景:填充背景色 painter.fillRect(self.rect(), bg_color) @@ -854,10 +851,9 @@ class SVGPreviewWidget(BasePreviewScene): def _draw_empty_hint(self, painter: QPainter): """绘制空配色提示""" - # 使用透明背景,让主题色透过来 - painter.setCompositionMode(QPainter.CompositionMode.CompositionMode_Clear) - painter.eraseRect(self.rect()) - painter.setCompositionMode(QPainter.CompositionMode.CompositionMode_SourceOver) + # 填充纯色背景(浅色模式白色,深色模式深灰色) + solid_bg = QColor("#ffffff") if not isDarkTheme() else QColor("#2a2a2a") + painter.fillRect(self.rect(), solid_bg) text_color = get_text_color() painter.setPen(QPen(text_color)) @@ -887,7 +883,6 @@ class BaseLayout(QWidget): self.setMinimumSize(200, 200) self.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding) - self.setStyleSheet("background: transparent;") def set_colors(self, colors: List[str]): self._colors = colors.copy() if colors else [] @@ -1232,6 +1227,7 @@ class GridLayout(BaseLayout): self._scroll_area.setCornerWidget(corner_widget) self._content_widget = QWidget() + self._content_widget.setStyleSheet("background: transparent;") self._content_layout = QGridLayout(self._content_widget) self._content_layout.setContentsMargins(10, 10, 10, 10) self._content_layout.setSpacing(15) @@ -1509,7 +1505,6 @@ class MixedPreviewPanel(QWidget): """创建UI""" self._main_layout = QVBoxLayout(self) self._main_layout.setContentsMargins(0, 0, 0, 0) - self.setStyleSheet("border: none; background: transparent;") def set_scene(self, scene: str): """切换预览场景 @@ -1769,7 +1764,7 @@ class PreviewToolbar(QWidget): def _update_styles(self): """更新样式以适配主题""" - self.setStyleSheet("background: transparent;") + pass def update_texts(self): """更新所有界面文本""" @@ -1856,8 +1851,6 @@ class ColorPreviewInterface(QWidget): def setup_ui(self): """设置界面布局""" - self.setStyleSheet("background: transparent;") - layout = QVBoxLayout(self) layout.setContentsMargins(20, 20, 20, 20) layout.setSpacing(15) -- Gitee From 6ccdf2dd208aa1f8d74747183adcb93ab1a1aa5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Fri, 10 Apr 2026 23:22:48 +0800 Subject: [PATCH 17/32] =?UTF-8?q?[=E4=BC=98=E5=8C=96]=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=20admin=5Fdashboard.svg=E7=9A=84=E5=8F=8C=E5=B1=82=E8=83=8C?= =?UTF-8?q?=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scenes_data/web/admin_dashboard.svg | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scenes_data/web/admin_dashboard.svg b/scenes_data/web/admin_dashboard.svg index 07fbd86..b1e1d06 100644 --- a/scenes_data/web/admin_dashboard.svg +++ b/scenes_data/web/admin_dashboard.svg @@ -1,6 +1,5 @@ - - + -- Gitee From f64d52bbed80742f412a8d67791401ae26a75a93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Sat, 11 Apr 2026 01:55:26 +0800 Subject: [PATCH 18/32] =?UTF-8?q?[=E5=86=85=E5=AE=B9=E8=B0=83=E6=95=B4]=20?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- version.txt | 4 ++-- version_info.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/version.txt b/version.txt index a7d708b..97fa07d 100644 --- a/version.txt +++ b/version.txt @@ -1,5 +1,5 @@ -1.7.1 · Beta -2026.4.10.2 +1.7.1 +2026.4.11.1 1.7.1.0 浮晓 HXiao Studio © 2026 浮晓 HXiao Studio diff --git a/version_info.txt b/version_info.txt index 749e51e..0de25b6 100644 --- a/version_info.txt +++ b/version_info.txt @@ -1,6 +1,6 @@ VSVersionInfo( ffi=FixedFileInfo( - filevers=(2026,4,10,2), + filevers=(2026,4,11,1), prodvers=(1,7,1,0), mask=0x3f, flags=0x0, -- Gitee From 8c832a2ed137585b46c520eab11207fc02344e62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Sat, 11 Apr 2026 01:59:54 +0800 Subject: [PATCH 19/32] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=20Nuitka=20Windows=20=E7=89=88=E6=9C=AC=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复 PowerShell 输出语法,使用 Add-Content 替代 >> - 修正 Nuitka 参数名,移除 --windows- 前缀 - 添加 --company-name 参数显示公司名称 - 添加 --copyright 参数显示版权信息 --- .github/workflows/build-windows.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index eaf0261..047da8d 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -52,12 +52,12 @@ jobs: Write-Host "Debug: copyright is: '$COPYRIGHT'" Write-Host "Debug: app name is: '$APP_NAME'" - "version=$VERSION" >> $env:GITHUB_OUTPUT - "file_version=$FILE_VERSION" >> $env:GITHUB_OUTPUT - "product_version=$PRODUCT_VERSION" >> $env:GITHUB_OUTPUT - "company_name=$COMPANY_NAME" >> $env:GITHUB_OUTPUT - "copyright=$COPYRIGHT" >> $env:GITHUB_OUTPUT - "app_name=$APP_NAME" >> $env:GITHUB_OUTPUT + Add-Content -Path $env:GITHUB_OUTPUT -Value "version=$VERSION" + Add-Content -Path $env:GITHUB_OUTPUT -Value "file_version=$FILE_VERSION" + Add-Content -Path $env:GITHUB_OUTPUT -Value "product_version=$PRODUCT_VERSION" + Add-Content -Path $env:GITHUB_OUTPUT -Value "company_name=$COMPANY_NAME" + Add-Content -Path $env:GITHUB_OUTPUT -Value "copyright=$COPYRIGHT" + Add-Content -Path $env:GITHUB_OUTPUT -Value "app_name=$APP_NAME" - name: Build Windows EXE with Nuitka shell: cmd @@ -68,10 +68,12 @@ jobs: --assume-yes-for-downloads ^ --windows-console-mode=disable ^ --windows-icon-from-ico="logo/Color Card_logo.ico" ^ - --windows-product-name="${{ steps.version.outputs.app_name }}" ^ - --windows-file-version="${{ steps.version.outputs.file_version }}" ^ - --windows-product-version="${{ steps.version.outputs.product_version }}" ^ - --windows-file-description="取色卡 - Color Card" ^ + --company-name="${{ steps.version.outputs.company_name }}" ^ + --product-name="${{ steps.version.outputs.app_name }}" ^ + --file-version="${{ steps.version.outputs.file_version }}" ^ + --product-version="${{ steps.version.outputs.product_version }}" ^ + --file-description="取色卡 - Color Card" ^ + --copyright="${{ steps.version.outputs.copyright }}" ^ --include-data-files=version.py=version.py ^ --include-data-dir=color_data=color_data ^ --include-data-dir=core=core ^ -- Gitee From cee40a8ac6de578ae309f2c76eae10c7f12f6d3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Sat, 11 Apr 2026 02:24:08 +0800 Subject: [PATCH 20/32] =?UTF-8?q?[=E6=9E=84=E5=BB=BA]=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?Inno=20Setup=E5=AE=89=E8=A3=85=E5=8C=85=E7=94=9F=E6=88=90?= =?UTF-8?q?=E5=88=B0CI=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改GitHub Actions工作流,支持同时生成便携版和安装版exe - 添加Inno Setup安装步骤,使用choco安装编译器 - 动态生成ISS脚本,从version.txt读取版本参数 - 上传两个产物:ColorCard-Windows-Portable和ColorCard-Windows-Installer - 移除GitHub Release上传步骤(因使用Gitee发布) --- .github/workflows/build-windows.yml | 170 ++++++++++++++++++++++++---- 1 file changed, 148 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 047da8d..d44b046 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -9,16 +9,16 @@ on: jobs: build-windows: runs-on: windows-latest - + steps: - name: Checkout code uses: actions/checkout@v4 - + - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.13' - + - name: Cache pip packages uses: actions/cache@v4 with: @@ -26,13 +26,13 @@ jobs: key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} restore-keys: | ${{ runner.os }}-pip- - + - name: Install dependencies run: | python -m pip install --upgrade pip pip install nuitka[onefile] pip install -r requirements.txt - + - name: Read version id: version shell: pwsh @@ -44,21 +44,21 @@ jobs: $COMPANY_NAME = $lines[3].Trim() $COPYRIGHT = $lines[4].Trim() $APP_NAME = $lines[5].Trim() - + Write-Host "Debug: version content is: '$VERSION'" Write-Host "Debug: file version is: '$FILE_VERSION'" Write-Host "Debug: product version is: '$PRODUCT_VERSION'" Write-Host "Debug: company name is: '$COMPANY_NAME'" Write-Host "Debug: copyright is: '$COPYRIGHT'" Write-Host "Debug: app name is: '$APP_NAME'" - + Add-Content -Path $env:GITHUB_OUTPUT -Value "version=$VERSION" Add-Content -Path $env:GITHUB_OUTPUT -Value "file_version=$FILE_VERSION" Add-Content -Path $env:GITHUB_OUTPUT -Value "product_version=$PRODUCT_VERSION" Add-Content -Path $env:GITHUB_OUTPUT -Value "company_name=$COMPANY_NAME" Add-Content -Path $env:GITHUB_OUTPUT -Value "copyright=$COPYRIGHT" Add-Content -Path $env:GITHUB_OUTPUT -Value "app_name=$APP_NAME" - + - name: Build Windows EXE with Nuitka shell: cmd run: | @@ -89,7 +89,7 @@ jobs: --jobs=4 ^ --output-filename="Color Card" ^ main.py - + - name: Check build output shell: pwsh run: | @@ -97,29 +97,155 @@ jobs: Get-ChildItem -Path "main.dist" -ErrorAction SilentlyContinue Get-ChildItem -Path "main.build" -ErrorAction SilentlyContinue Get-ChildItem -Path "*.exe" -ErrorAction SilentlyContinue - + - name: Create distribution folder shell: pwsh run: | $distDir = "dist" New-Item -ItemType Directory -Force -Path $distDir - + # 复制生成的 exe 文件 Copy-Item "Color Card.exe" -Destination "$distDir\Color Card.exe" - + Write-Host "Distribution folder contents:" Get-ChildItem -Path $distDir - - - name: Upload artifact + + - name: Upload portable artifact uses: actions/upload-artifact@v4 with: - name: ColorCard-Windows-Nuitka + name: ColorCard-Windows-Portable path: dist/*.exe - - - name: Upload Release Asset - if: startsWith(github.ref, 'refs/tags/') - uses: softprops/action-gh-release@v1 + + - name: Install Inno Setup + run: | + choco install innosetup -y + + - name: Download Chinese language file for Inno Setup + shell: pwsh + run: | + $langDir = "C:\Program Files (x86)\Inno Setup 6\Languages" + $langUrl = "https://raw.githubusercontent.com/jrsoftware/issrc/main/Files/Languages/Unofficial/ChineseSimplified.isl" + Invoke-WebRequest -Uri $langUrl -OutFile "$langDir\ChineseSimplified.isl" + Write-Host "Downloaded ChineseSimplified.isl to $langDir" + + - name: Create Inno Setup script + shell: pwsh + run: | + $version = "${{ steps.version.outputs.version }}" + $companyName = "${{ steps.version.outputs.company_name }}" + $copyright = "${{ steps.version.outputs.copyright }}" + $appName = "${{ steps.version.outputs.app_name }}" + $fileVersion = "${{ steps.version.outputs.file_version }}" + $productVersion = "${{ steps.version.outputs.product_version }}" + + $issContent = @" +; Script generated for GitHub Actions +; Non-commercial use only + +#define MyAppName "取色卡" +#define MyAppVersion "$version" +#define MyAppPublisher "$companyName" +#define MyAppURL "https://gitee.com/qingshangongzai" +#define MyAppExeName "Color Card.exe" + +[Setup] +AppId={{8EBD3944-B989-4878-B943-DE4558FDF22C} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +AppVerName={#MyAppName} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +AppCopyright=$copyright +DefaultDirName={autopf}\{#MyAppName} +UninstallDisplayIcon={app}\{#MyAppExeName} +ArchitecturesAllowed=x64compatible +ArchitecturesInstallIn64BitMode=x64compatible +DisableProgramGroupPage=yes +OutputDir=output +OutputBaseFilename=Color_Card_Setup +SetupIconFile=logo\Color Card_logo.ico +SolidCompression=yes +WizardStyle=modern dynamic + +; 版本信息设置 +VersionInfoVersion=$fileVersion +VersionInfoCompany=$companyName +VersionInfoDescription=取色卡 - Color Card +VersionInfoCopyright=$copyright +VersionInfoProductName=取色卡 +VersionInfoProductVersion=$version +VersionInfoOriginalFilename=Color_Card.exe + +[Languages] +Name: "chinesesimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl" + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked + +[Files] +Source: "dist\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion + +[Icons] +Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" +Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon + +[Run] +Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent + +[Code] +var + DeleteDataDir: Boolean; + DataDir: string; + +function InitializeUninstall(): Boolean; +begin + Result := True; + DeleteDataDir := False; + + DataDir := ExpandConstant('{%USERPROFILE}\.color_card'); + if DirExists(DataDir) then + begin + if MsgBox('是否删除应用程序数据文件?' + #13#10 + #13#10 + + '数据目录:' + DataDir + #13#10 + #13#10 + + '包含:配置文件、日志文件、收藏数据等', + mbConfirmation, MB_YESNO) = IDYES then + begin + DeleteDataDir := True; + end; + end; +end; + +procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); +begin + if (CurUninstallStep = usPostUninstall) and DeleteDataDir then + begin + DataDir := ExpandConstant('{%USERPROFILE}\.color_card'); + if DirExists(DataDir) then + begin + DelTree(DataDir, True, True, True); + end; + end; +end; +"@ + + $issContent | Out-File -FilePath "setup.iss" -Encoding UTF8 + Write-Host "Created setup.iss" + + - name: Build Installer with Inno Setup + shell: cmd + run: | + "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" setup.iss + + - name: Check installer output + shell: pwsh + run: | + Write-Host "Checking installer output..." + Get-ChildItem -Path "output" -ErrorAction SilentlyContinue + + - name: Upload installer artifact + uses: actions/upload-artifact@v4 with: - files: dist/*.exe - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + name: ColorCard-Windows-Installer + path: output/*.exe -- Gitee From 839a2968699dc348baa64a98ebd63d949e2baa56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Sat, 11 Apr 2026 02:30:48 +0800 Subject: [PATCH 21/32] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?CI=E5=B7=A5=E4=BD=9C=E6=B5=81YAML=E8=AF=AD=E6=B3=95=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将PowerShell here-string改为数组方式生成ISS脚本 - 解决@符号在YAML中的特殊含义导致的解析错误 - 确保GitHub Actions能正确生成Inno Setup安装脚本 --- .github/workflows/build-windows.yml | 186 ++++++++++++++-------------- 1 file changed, 93 insertions(+), 93 deletions(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index d44b046..d7b3396 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -138,99 +138,99 @@ jobs: $fileVersion = "${{ steps.version.outputs.file_version }}" $productVersion = "${{ steps.version.outputs.product_version }}" - $issContent = @" -; Script generated for GitHub Actions -; Non-commercial use only - -#define MyAppName "取色卡" -#define MyAppVersion "$version" -#define MyAppPublisher "$companyName" -#define MyAppURL "https://gitee.com/qingshangongzai" -#define MyAppExeName "Color Card.exe" - -[Setup] -AppId={{8EBD3944-B989-4878-B943-DE4558FDF22C} -AppName={#MyAppName} -AppVersion={#MyAppVersion} -AppVerName={#MyAppName} -AppPublisher={#MyAppPublisher} -AppPublisherURL={#MyAppURL} -AppSupportURL={#MyAppURL} -AppUpdatesURL={#MyAppURL} -AppCopyright=$copyright -DefaultDirName={autopf}\{#MyAppName} -UninstallDisplayIcon={app}\{#MyAppExeName} -ArchitecturesAllowed=x64compatible -ArchitecturesInstallIn64BitMode=x64compatible -DisableProgramGroupPage=yes -OutputDir=output -OutputBaseFilename=Color_Card_Setup -SetupIconFile=logo\Color Card_logo.ico -SolidCompression=yes -WizardStyle=modern dynamic - -; 版本信息设置 -VersionInfoVersion=$fileVersion -VersionInfoCompany=$companyName -VersionInfoDescription=取色卡 - Color Card -VersionInfoCopyright=$copyright -VersionInfoProductName=取色卡 -VersionInfoProductVersion=$version -VersionInfoOriginalFilename=Color_Card.exe - -[Languages] -Name: "chinesesimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl" - -[Tasks] -Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked - -[Files] -Source: "dist\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion - -[Icons] -Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" -Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon - -[Run] -Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent - -[Code] -var - DeleteDataDir: Boolean; - DataDir: string; - -function InitializeUninstall(): Boolean; -begin - Result := True; - DeleteDataDir := False; - - DataDir := ExpandConstant('{%USERPROFILE}\.color_card'); - if DirExists(DataDir) then - begin - if MsgBox('是否删除应用程序数据文件?' + #13#10 + #13#10 + - '数据目录:' + DataDir + #13#10 + #13#10 + - '包含:配置文件、日志文件、收藏数据等', - mbConfirmation, MB_YESNO) = IDYES then - begin - DeleteDataDir := True; - end; - end; -end; - -procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); -begin - if (CurUninstallStep = usPostUninstall) and DeleteDataDir then - begin - DataDir := ExpandConstant('{%USERPROFILE}\.color_card'); - if DirExists(DataDir) then - begin - DelTree(DataDir, True, True, True); - end; - end; -end; -"@ - - $issContent | Out-File -FilePath "setup.iss" -Encoding UTF8 + $issLines = @( + '; Script generated for GitHub Actions', + '; Non-commercial use only', + '', + '#define MyAppName "取色卡"', + "#define MyAppVersion `"$version`"", + "#define MyAppPublisher `"$companyName`"", + '#define MyAppURL "https://gitee.com/qingshangongzai"', + '#define MyAppExeName "Color Card.exe"', + '', + '[Setup]', + 'AppId={{8EBD3944-B989-4878-B943-DE4558FDF22C}', + 'AppName={#MyAppName}', + 'AppVersion={#MyAppVersion}', + 'AppVerName={#MyAppName}', + 'AppPublisher={#MyAppPublisher}', + 'AppPublisherURL={#MyAppURL}', + 'AppSupportURL={#MyAppURL}', + 'AppUpdatesURL={#MyAppURL}', + "AppCopyright=$copyright", + 'DefaultDirName={autopf}\{#MyAppName}', + 'UninstallDisplayIcon={app}\{#MyAppExeName}', + 'ArchitecturesAllowed=x64compatible', + 'ArchitecturesInstallIn64BitMode=x64compatible', + 'DisableProgramGroupPage=yes', + 'OutputDir=output', + 'OutputBaseFilename=Color_Card_Setup', + 'SetupIconFile=logo\Color Card_logo.ico', + 'SolidCompression=yes', + 'WizardStyle=modern dynamic', + '', + '; 版本信息设置', + "VersionInfoVersion=$fileVersion", + "VersionInfoCompany=$companyName", + 'VersionInfoDescription=取色卡 - Color Card', + "VersionInfoCopyright=$copyright", + 'VersionInfoProductName=取色卡', + "VersionInfoProductVersion=$version", + 'VersionInfoOriginalFilename=Color_Card.exe', + '', + '[Languages]', + 'Name: "chinesesimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"', + '', + '[Tasks]', + 'Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked', + '', + '[Files]', + 'Source: "dist\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion', + '', + '[Icons]', + 'Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"', + 'Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon', + '', + '[Run]', + 'Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, ''&'', ''&&'')}}"; Flags: nowait postinstall skipifsilent', + '', + '[Code]', + 'var', + ' DeleteDataDir: Boolean;', + ' DataDir: string;', + '', + 'function InitializeUninstall(): Boolean;', + 'begin', + ' Result := True;', + ' DeleteDataDir := False;', + '', + ' DataDir := ExpandConstant(''{%USERPROFILE}\.color_card'');', + ' if DirExists(DataDir) then', + ' begin', + ' if MsgBox(''是否删除应用程序数据文件?'' + #13#10 + #13#10 +', + ' ''数据目录:'' + DataDir + #13#10 + #13#10 +', + ' ''包含:配置文件、日志文件、收藏数据等'',', + ' mbConfirmation, MB_YESNO) = IDYES then', + ' begin', + ' DeleteDataDir := True;', + ' end;', + ' end;', + 'end;', + '', + 'procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);', + 'begin', + ' if (CurUninstallStep = usPostUninstall) and DeleteDataDir then', + ' begin', + ' DataDir := ExpandConstant(''{%USERPROFILE}\.color_card'');', + ' if DirExists(DataDir) then', + ' begin', + ' DelTree(DataDir, True, True, True);', + ' end;', + ' end;', + 'end;' + ) + + $issLines | Out-File -FilePath "setup.iss" -Encoding UTF8 Write-Host "Created setup.iss" - name: Build Installer with Inno Setup -- Gitee From 6bce7b843be8ea7a24ae5e2e4b8d6d1e3a13315c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Sat, 11 Apr 2026 02:49:35 +0800 Subject: [PATCH 22/32] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E6=89=8B=E6=9C=BA?= =?UTF-8?q?UI=E8=BE=B9=E6=A1=86=E9=A2=9C=E8=89=B2=E5=8F=8A=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E8=83=8C=E6=99=AF=E6=98=BE=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 统一mobile_ui场景SVG手机边框颜色为#666666 - 优化预览区域背景色显示逻辑 - 浅色模式显示白色背景,深色模式显示#2a2a2a - 设置GridLayout间隔区域透明 --- scenes_data/mobile_ui/dashboard.svg | 2 +- scenes_data/mobile_ui/default.svg | 2 +- scenes_data/mobile_ui/stats.svg | 2 +- scenes_data/mobile_ui/timer.svg | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scenes_data/mobile_ui/dashboard.svg b/scenes_data/mobile_ui/dashboard.svg index 3fbb75c..fb26253 100644 --- a/scenes_data/mobile_ui/dashboard.svg +++ b/scenes_data/mobile_ui/dashboard.svg @@ -3,7 +3,7 @@ - + diff --git a/scenes_data/mobile_ui/default.svg b/scenes_data/mobile_ui/default.svg index a68d23b..c325450 100644 --- a/scenes_data/mobile_ui/default.svg +++ b/scenes_data/mobile_ui/default.svg @@ -3,7 +3,7 @@ - + diff --git a/scenes_data/mobile_ui/stats.svg b/scenes_data/mobile_ui/stats.svg index bacdc6d..a9c264f 100644 --- a/scenes_data/mobile_ui/stats.svg +++ b/scenes_data/mobile_ui/stats.svg @@ -3,7 +3,7 @@ - + diff --git a/scenes_data/mobile_ui/timer.svg b/scenes_data/mobile_ui/timer.svg index 0ee0912..2ccee91 100644 --- a/scenes_data/mobile_ui/timer.svg +++ b/scenes_data/mobile_ui/timer.svg @@ -3,7 +3,7 @@ - + -- Gitee From e1426982fe221c644622da05289147c2d64e9443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Sat, 11 Apr 2026 03:05:07 +0800 Subject: [PATCH 23/32] =?UTF-8?q?[=E6=9E=84=E5=BB=BA]=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?Windows=E6=9E=84=E5=BB=BA=E4=BA=A7=E7=89=A9=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 便携版exe文件名改为Color_Card_{version}_x64.exe格式 - 安装版exe文件名改为Color_Card_{version}_x64_Setup.exe格式 - 与Mac版命名风格保持一致,方便版本管理 --- .github/workflows/build-windows.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index d7b3396..8a11085 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -104,8 +104,11 @@ jobs: $distDir = "dist" New-Item -ItemType Directory -Force -Path $distDir - # 复制生成的 exe 文件 - Copy-Item "Color Card.exe" -Destination "$distDir\Color Card.exe" + $version = "${{ steps.version.outputs.version }}" + $portableName = "Color_Card_${version}_x64.exe" + + # 复制生成的 exe 文件,使用版本号命名 + Copy-Item "Color Card.exe" -Destination "$distDir\$portableName" Write-Host "Distribution folder contents:" Get-ChildItem -Path $distDir @@ -138,6 +141,8 @@ jobs: $fileVersion = "${{ steps.version.outputs.file_version }}" $productVersion = "${{ steps.version.outputs.product_version }}" + $setupName = "Color_Card_${version}_x64_Setup" + $issLines = @( '; Script generated for GitHub Actions', '; Non-commercial use only', @@ -164,7 +169,7 @@ jobs: 'ArchitecturesInstallIn64BitMode=x64compatible', 'DisableProgramGroupPage=yes', 'OutputDir=output', - 'OutputBaseFilename=Color_Card_Setup', + "OutputBaseFilename=$setupName", 'SetupIconFile=logo\Color Card_logo.ico', 'SolidCompression=yes', 'WizardStyle=modern dynamic', -- Gitee From 931de4e0a59849424443192ba46dcb49b37e4928 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Sat, 11 Apr 2026 03:29:24 +0800 Subject: [PATCH 24/32] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?ISS=E8=84=9A=E6=9C=AC=E4=B8=AD=E6=BA=90=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E5=BC=95=E7=94=A8=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增MyPortableName宏定义,使用带版本号的文件名 - 修改[Files]节Source引用MyPortableName - 添加DestName确保安装后exe文件名保持为Color Card.exe --- .github/workflows/build-windows.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 8a11085..8ea7150 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -142,6 +142,7 @@ jobs: $productVersion = "${{ steps.version.outputs.product_version }}" $setupName = "Color_Card_${version}_x64_Setup" + $portableName = "Color_Card_${version}_x64.exe" $issLines = @( '; Script generated for GitHub Actions', @@ -152,6 +153,7 @@ jobs: "#define MyAppPublisher `"$companyName`"", '#define MyAppURL "https://gitee.com/qingshangongzai"', '#define MyAppExeName "Color Card.exe"', + "#define MyPortableName `"$portableName`"", '', '[Setup]', 'AppId={{8EBD3944-B989-4878-B943-DE4558FDF22C}', @@ -190,7 +192,7 @@ jobs: 'Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked', '', '[Files]', - 'Source: "dist\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion', + 'Source: "dist\{#MyPortableName}"; DestDir: "{app}"; DestName: "{#MyAppExeName}"; Flags: ignoreversion', '', '[Icons]', 'Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"', -- Gitee From 82657a0be88353b4daa4d0c939430e7488946b5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Sat, 11 Apr 2026 04:23:12 +0800 Subject: [PATCH 25/32] =?UTF-8?q?[=E6=9E=84=E5=BB=BA]=20=E7=BB=9F=E4=B8=80?= =?UTF-8?q?CI=E5=B7=A5=E4=BD=9C=E6=B5=81=E6=97=B6=E5=8C=BA=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=B9=B6=E7=A7=BB=E9=99=A4GitHub=20Release=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Windows和Mac构建工作流添加TZ环境变量设置为Asia/Shanghai - 移除build-mac.yml中的GitHub Release自动上传步骤 - 构建产物仅保留artifact上传,便于手动发布到Gitee --- .github/workflows/build-mac.yml | 11 +++-------- .github/workflows/build-windows.yml | 3 +++ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-mac.yml b/.github/workflows/build-mac.yml index ee864fb..92d6747 100644 --- a/.github/workflows/build-mac.yml +++ b/.github/workflows/build-mac.yml @@ -10,6 +10,9 @@ jobs: build-macos: runs-on: macos-latest + env: + TZ: Asia/Shanghai + steps: - name: Checkout code uses: actions/checkout@v4 @@ -237,11 +240,3 @@ jobs: path: | dist/**/*.app/Contents/Info.plist dist/dmg/**/*.app/Contents/Info.plist - - - name: Upload Release Asset - if: startsWith(github.ref, 'refs/tags/') - uses: softprops/action-gh-release@v1 - with: - files: dist/Color_Card_*_mac.dmg - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 8ea7150..4bd0395 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -10,6 +10,9 @@ jobs: build-windows: runs-on: windows-latest + env: + TZ: Asia/Shanghai + steps: - name: Checkout code uses: actions/checkout@v4 -- Gitee From 1bd3acb5dac0ce41da58dccaa8090a4a8907e954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Sat, 11 Apr 2026 13:42:34 +0800 Subject: [PATCH 26/32] =?UTF-8?q?[=E6=96=87=E6=A1=A3]=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=BA=86=E8=AF=B4=E6=98=8E=E6=96=87=E6=A1=A3=E4=B8=AD=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E6=97=A0=E6=B3=95=E6=AD=A3=E7=A1=AE=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 7ad4f07..020aae5 100644 --- a/README.md +++ b/README.md @@ -63,17 +63,17 @@ **一站式色彩解决方案**:从图片分析到配色应用,提供完整的色彩工作流 -| 功能 | 截图预览 | -| ----------------------------------------------------------------------- | -------------------------------------------------------------------- | -| **色彩信息提取**通过可拖动取色点实时提取图片颜色,支持多色彩空间显示(HSB、LAB、HSL、CMYK、RGB) | !\[色彩提取]\(docs/screenshots/color-extract.png null) | -| **明度分析**将图片按明度分为9个区域(基于Adobe标准),提供直方图可视化,可快速分析图片影调 | !\[明度分析]\(docs/screenshots/luminance-extract.png null) | -| **渐变色提取**通过起始色和结束色生成渐变色序列,支持 RGB/HSB/LAB 三种颜色空间插值 | !\[渐变色提取]\(docs/screenshots/Gradient%20Extract.png null) | -| **配色生成**提供5种专业配色方案(同色系、邻近色、互补色、分离补色、双补色),支持可交互色环选择 | !\[配色生成]\(docs/screenshots/color-generation.png null) | -| **配色收藏**支持收藏、管理配色方案,支持批量导入导出为JSON文件,支持单组色卡导出为 Adobe ASE 格式 | !\[配色管理]\(docs/screenshots/palette-management.png null) | -| **内置色彩库**集成 Open Color、Tailwind CSS、Material Design 等13大开源配色方案,总计661组色卡 | !\[内置色彩库]\(docs/screenshots/preset-colors.png null) | -| **配色预览**支持手机UI、网页、插画、排版、品牌、海报、图案、杂志等8种场景预览,并支持导入自定义SVG | !\[配色预览]\(docs/screenshots/color-preview\.png null) | -| **多语言支持**支持简体中文、繁体中文、英语、日语、法语、俄语等6种语言 | !\[多语言支持]\(docs/screenshots/locales.png null) | -| **现代化界面**基于 Fluent Design 设计语言,支持深色/浅色主题切换 | !\[深色/浅色模式]\(./docs/screenshots/Dark%20mode%26light%20mode.png null) | +| 功能 | 截图预览 | +|------|---------| +| **色彩信息提取**
通过可拖动取色点实时提取图片颜色,支持多色彩空间显示(HSB、LAB、HSL、CMYK、RGB) | ![色彩提取](docs/screenshots/color-extract.png) | +| **明度分析**
将图片按明度分为9个区域(基于Adobe标准),提供直方图可视化,可快速分析图片影调 | ![明度分析](docs/screenshots/luminance-extract.png) | +| **渐变色提取**
通过起始色和结束色生成渐变色序列,支持 RGB/HSB/LAB 三种颜色空间插值 | ![渐变色提取](docs/screenshots/Gradient%20Extract.png) | +| **配色生成**
提供5种专业配色方案(同色系、邻近色、互补色、分离补色、双补色),支持可交互色环选择 | ![配色生成](docs/screenshots/color-generation.png) | +| **配色收藏**
支持收藏、管理配色方案,支持批量导入导出为JSON文件,支持单组色卡导出为 Adobe ASE 格式 | ![配色管理](docs/screenshots/palette-management.png) | +| **内置色彩库**
集成 Open Color、Tailwind CSS、Material Design 等13大开源配色方案,总计661组色卡 | ![内置色彩库](docs/screenshots/preset-colors.png) | +| **配色预览**
支持手机UI、网页、插画、排版、品牌、海报、图案、杂志等8种场景预览,并支持导入自定义SVG | ![配色预览](docs/screenshots/color-preview.png) | +| **多语言支持**
支持简体中文、繁体中文、英语、日语、法语、俄语等6种语言 | ![多语言支持](docs/screenshots/locales.png) | +| **现代化界面**
基于 Fluent Design 设计语言,支持深色/浅色主题切换 | ![深色/浅色模式](./docs/screenshots/Dark%20mode%26light%20mode.png) | ### 适用场景 @@ -314,18 +314,17 @@ Since the release of v1.0.0 on 2026-02-05, the project has maintained a fast and **One-stop Color Solution**: Complete color workflow from image analysis to color application -| Feature | Screenshot | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| **Visual Color Extraction**Real-time color extraction via draggable color pickers, supporting multiple color spaces (HSB, LAB, HSL, CMYK, RGB) | !\[Color Extraction]\(docs/screenshots/color-extract.png null) | -| **Luminance Analysis**9-zone luminance segmentation (Zone 0-8 based on Adobe standard) with histogram visualization | !\[Luminance Analysis]\(docs/screenshots/luminance-extract.png null) | -| **Gradient Extraction**Generate gradient color sequences from start and end colors, supporting RGB/HSB/LAB color space interpolation | !\[Gradient Extraction]\(docs/screenshots/Gradient%20Extract.png null) | -| **Color Scheme Generation**5 professional color schemes (Monochromatic, Analogous, Complementary, Split-Complementary, Double Complementary) with interactive color wheel | !\[Color Generation]\(docs/screenshots/color-generation.png null) | -| **Palette Collection**Save and manage color schemes, support batch import/export in JSON format, support single palette export to Adobe ASE format | !\[Palette Management]\(docs/screenshots/palette-management.png null) | -| **Built-in Color Library**13 major open-source color schemes including Open Color, Tailwind CSS, Material Design, totaling 661 color palettes | !\[Preset Colors]\(docs/screenshots/preset-colors.png null) | -| **Color Preview**8 built-in scene previews (Mobile UI, Web, Illustration, Typography, Brand, Poster, Pattern, Magazine) with custom SVG support | !\[Color Preview]\(docs/screenshots/color-preview\.png null) | -| **Multi-language Support**6 languages including Simplified Chinese, Traditional Chinese, English, Japanese, French, and Russian | !\[Multi-language]\(docs/screenshots/locales.png null) | -| **Modern Interface**Based on Fluent Design, supports dark/light theme switching | !\[Dark/Light Mode]\(./docs/screenshots/Dark%20mode%26light%20mode.png null) | - +| Feature | Screenshot | +|---------|------------| +| **Visual Color Extraction**
Real-time color extraction via draggable color pickers, supporting multiple color spaces (HSB, LAB, HSL, CMYK, RGB) | ![Color Extraction](docs/screenshots/color-extract.png) | +| **Luminance Analysis**
9-zone luminance segmentation (Zone 0-8 based on Adobe standard) with histogram visualization | ![Luminance Analysis](docs/screenshots/luminance-extract.png) | +| **Gradient Extraction**
Generate gradient color sequences from start and end colors, supporting RGB/HSB/LAB color space interpolation | ![Gradient Extraction](docs/screenshots/Gradient%20Extract.png) | +| **Color Scheme Generation**
5 professional color schemes (Monochromatic, Analogous, Complementary, Split-Complementary, Double Complementary) with interactive color wheel | ![Color Generation](docs/screenshots/color-generation.png) | +| **Palette Collection**
Save and manage color schemes, support batch import/export in JSON format, support single palette export to Adobe ASE format | ![Palette Management](docs/screenshots/palette-management.png) | +| **Built-in Color Library**
13 major open-source color schemes including Open Color, Tailwind CSS, Material Design, totaling 661 color palettes | ![Preset Colors](docs/screenshots/preset-colors.png) | +| **Color Preview**
8 built-in scene previews (Mobile UI, Web, Illustration, Typography, Brand, Poster, Pattern, Magazine) with custom SVG support | ![Color Preview](docs/screenshots/color-preview.png) | +| **Multi-language Support**
6 languages including Simplified Chinese, Traditional Chinese, English, Japanese, French, and Russian | ![Multi-language](docs/screenshots/locales.png) | +| **Modern Interface**
Based on Fluent Design, supports dark/light theme switching | ![Dark/Light Mode](./docs/screenshots/Dark%20mode%26light%20mode.png) | ### Use Cases **Photographer Workflow** -- Gitee From 13425f73a14ac102ca3a72eb51711e0ea7a4a9c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Sat, 11 Apr 2026 14:01:31 +0800 Subject: [PATCH 27/32] =?UTF-8?q?[=E6=96=87=E6=A1=A3]=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=20v1.7.1=20=E7=89=88=E6=9C=AC=E6=97=A5=E5=BF=97=E5=92=8C?= =?UTF-8?q?=E5=BC=80=E5=8F=91=E5=8E=86=E7=A8=8B=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新 website/public/changelog.json,添加 v1.7.1 版本更新内容 - 更新 README.md 中文版开发历程数据(版本数、开发周期、更新项统计) - 更新 README.md 英文版开发历程数据 --- README.md | 24 ++++++++++++------------ docs/changelog.json | 22 ++++++++++++++++++++++ website/public/changelog.json | 22 ++++++++++++++++++++++ 3 files changed, 56 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 020aae5..5c82a69 100644 --- a/README.md +++ b/README.md @@ -38,18 +38,18 @@ | 指标 | 数据 | | :---- | :---------------------- | -| 发布版本 | 10 个版本(v1.0.0 → v1.7.0) | -| 开发周期 | 59 天 | -| 总更新项 | **127 项** | -| 平均每版本 | 12.7 项 | +| 发布版本 | 11 个版本(v1.0.0 → v1.7.1) | +| 开发周期 | 66 天 | +| 总更新项 | **133 项** | +| 平均每版本 | 12.1 项 | **详细分类统计**: | 分类 | 数量 | 说明 | | :------- | :----: | :-------------- | | ✨ 新增功能 | **36** | 包含首次发布的 9 项核心功能 | -| 🔧 问题修复 | **28** | 持续修复 Bug,提升稳定性 | -| 🎨 界面优化 | **32** | 用户体验打磨 | +| 🔧 问题修复 | **32** | 持续修复 Bug,提升稳定性 | +| 🎨 界面优化 | **34** | 用户体验打磨 | | ⚡ 性能提升 | **11** | 缓存机制、启动优化等 | | 📝 内容调整 | **5** | 文本、名称等调整 | | ⚙️ 体验优化 | **5** | 交互体验改进 | @@ -289,18 +289,18 @@ Since the release of v1.0.0 on 2026-02-05, the project has maintained a fast and | Metric | Data | | :------------------ | :---------------------------- | -| Released Versions | 10 versions (v1.0.0 → v1.7.0) | -| Development Period | 59 days | -| Total Updates | **127 items** | -| Average per Version | 12.7 items | +| Released Versions | 11 versions (v1.0.0 → v1.7.1) | +| Development Period | 66 days | +| Total Updates | **133 items** | +| Average per Version | 12.1 items | **Detailed Category Statistics(portion)**: | Category | Count | Description | | :--------------------- | :----: | :------------------------------------------- | | ✨ New Features | **36** | Including 9 core features from v1.0.0 launch | -| 🔧 Bug Fixes | **28** | Continuous bug fixes for stability | -| 🎨 UI Improvements | **32** | User experience refinements | +| 🔧 Bug Fixes | **32** | Continuous bug fixes for stability | +| 🎨 UI Improvements | **34** | User experience refinements | | ⚡ Performance | **11** | Cache mechanism, startup optimization | | 📝 Content Adjustments | **5** | Text, naming adjustments | | ⚙️ Experience | **5** | Interaction improvements | diff --git a/docs/changelog.json b/docs/changelog.json index da2aa0c..2309e67 100644 --- a/docs/changelog.json +++ b/docs/changelog.json @@ -1,5 +1,27 @@ { "versions": [ + { + "version": "v1.7.1", + "date": "2026-04-12", + "changes": [ + { + "category": "问题修复", + "items": [ + "修复版本号比较逻辑错误,优化 Beta 版本号识别", + "修复色盲预览对话框无法打开的问题", + "修复对比度检查对话框窗口高度不足而导致的移动时缩小的问题", + "修复配色预览面板 SVG 缩放和布局显示异常问题" + ] + }, + { + "category": "界面优化", + "items": [ + "优化配色预览场景的背景显示效果", + "修复 SVG 预览区域透明背景在深色模式下显示为白色的问题" + ] + } + ] + }, { "version": "v1.7.0", "date": "2026-04-05", diff --git a/website/public/changelog.json b/website/public/changelog.json index da2aa0c..2309e67 100644 --- a/website/public/changelog.json +++ b/website/public/changelog.json @@ -1,5 +1,27 @@ { "versions": [ + { + "version": "v1.7.1", + "date": "2026-04-12", + "changes": [ + { + "category": "问题修复", + "items": [ + "修复版本号比较逻辑错误,优化 Beta 版本号识别", + "修复色盲预览对话框无法打开的问题", + "修复对比度检查对话框窗口高度不足而导致的移动时缩小的问题", + "修复配色预览面板 SVG 缩放和布局显示异常问题" + ] + }, + { + "category": "界面优化", + "items": [ + "优化配色预览场景的背景显示效果", + "修复 SVG 预览区域透明背景在深色模式下显示为白色的问题" + ] + } + ] + }, { "version": "v1.7.0", "date": "2026-04-05", -- Gitee From 22973095808de277828e8e6f6dbd60ad3b9c92ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Sat, 11 Apr 2026 14:09:29 +0800 Subject: [PATCH 28/32] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=20GitHub=20Actions=20=E5=B7=A5=E4=BD=9C=E6=B5=81=E4=BB=A5?= =?UTF-8?q?=E6=94=AF=E6=8C=81=20Node.js=2024?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 build-windows.yml 中添加 FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 环境变量 - 在 build-mac.yml 中添加 FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 环境变量 - 在 pages.yml 中添加 FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 环境变量 - 消除 Node.js 20 弃用警告,提前适配 GitHub Actions 运行时更新 --- .github/workflows/build-mac.yml | 1 + .github/workflows/build-windows.yml | 1 + .github/workflows/pages.yml | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/.github/workflows/build-mac.yml b/.github/workflows/build-mac.yml index 92d6747..e6149ca 100644 --- a/.github/workflows/build-mac.yml +++ b/.github/workflows/build-mac.yml @@ -12,6 +12,7 @@ jobs: env: TZ: Asia/Shanghai + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true steps: - name: Checkout code diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 4bd0395..05fbb6b 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -12,6 +12,7 @@ jobs: env: TZ: Asia/Shanghai + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true steps: - name: Checkout code diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 14931b2..b62ba06 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -18,6 +18,10 @@ concurrency: jobs: deploy: runs-on: ubuntu-latest + + env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + steps: - name: Checkout uses: actions/checkout@v4 -- Gitee From 3e8613ff423d1c6c823c9975ee9397819647aa6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Sat, 11 Apr 2026 18:16:31 +0800 Subject: [PATCH 29/32] =?UTF-8?q?[=E6=A0=B7=E5=BC=8F]=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E9=80=89=E6=8B=A9=E5=99=A8=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E6=A1=86=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 ColorPickerDialog 高度从 420px 增加到 460px --- dialogs/edit_palette.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dialogs/edit_palette.py b/dialogs/edit_palette.py index 30d2b83..383d925 100644 --- a/dialogs/edit_palette.py +++ b/dialogs/edit_palette.py @@ -428,7 +428,7 @@ class ColorPickerDialog(BaseFramelessDialog): self._updating = False # 防止循环更新 self.setWindowTitle(tr('dialogs.color_picker.title')) - self.setFixedSize(520, 420) + self.setFixedSize(520, 460) # 设置自定义标题栏 self._setup_title_bar() -- Gitee From 034cac4d8b0d5710e11815aedd993253725adb2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Sat, 11 Apr 2026 19:32:43 +0800 Subject: [PATCH 30/32] =?UTF-8?q?[=E6=96=87=E6=A1=A3]=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=20v1.7.1=20=E7=89=88=E6=9C=AC=E6=97=A5=E5=BF=97=E5=92=8C?= =?UTF-8?q?=E5=BC=80=E5=8F=91=E5=8E=86=E7=A8=8B=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新 website/public/changelog.json,添加 v1.7.1 版本更新内容(增加颜色选择器对话框高度) - 更新 README.md 中文版开发历程数据(界面优化 34→35 项) - 更新 README.md 英文版开发历程数据(UI Improvements 34→35) --- README.md | 4 ++-- docs/changelog.json | 3 ++- website/public/changelog.json | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5c82a69..c62e225 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ | :------- | :----: | :-------------- | | ✨ 新增功能 | **36** | 包含首次发布的 9 项核心功能 | | 🔧 问题修复 | **32** | 持续修复 Bug,提升稳定性 | -| 🎨 界面优化 | **34** | 用户体验打磨 | +| 🎨 界面优化 | **35** | 用户体验打磨 | | ⚡ 性能提升 | **11** | 缓存机制、启动优化等 | | 📝 内容调整 | **5** | 文本、名称等调整 | | ⚙️ 体验优化 | **5** | 交互体验改进 | @@ -300,7 +300,7 @@ Since the release of v1.0.0 on 2026-02-05, the project has maintained a fast and | :--------------------- | :----: | :------------------------------------------- | | ✨ New Features | **36** | Including 9 core features from v1.0.0 launch | | 🔧 Bug Fixes | **32** | Continuous bug fixes for stability | -| 🎨 UI Improvements | **34** | User experience refinements | +| 🎨 UI Improvements | **35** | User experience refinements | | ⚡ Performance | **11** | Cache mechanism, startup optimization | | 📝 Content Adjustments | **5** | Text, naming adjustments | | ⚙️ Experience | **5** | Interaction improvements | diff --git a/docs/changelog.json b/docs/changelog.json index 2309e67..a5c281f 100644 --- a/docs/changelog.json +++ b/docs/changelog.json @@ -17,7 +17,8 @@ "category": "界面优化", "items": [ "优化配色预览场景的背景显示效果", - "修复 SVG 预览区域透明背景在深色模式下显示为白色的问题" + "修复 SVG 预览区域透明背景在深色模式下显示为白色的问题", + "增加颜色选择器对话框高度,避免内容被截断" ] } ] diff --git a/website/public/changelog.json b/website/public/changelog.json index 2309e67..a5c281f 100644 --- a/website/public/changelog.json +++ b/website/public/changelog.json @@ -17,7 +17,8 @@ "category": "界面优化", "items": [ "优化配色预览场景的背景显示效果", - "修复 SVG 预览区域透明背景在深色模式下显示为白色的问题" + "修复 SVG 预览区域透明背景在深色模式下显示为白色的问题", + "增加颜色选择器对话框高度,避免内容被截断" ] } ] -- Gitee From fcfdcce60b2da69aa6ed2e8646c426eed7c68d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Sat, 11 Apr 2026 19:38:35 +0800 Subject: [PATCH 31/32] =?UTF-8?q?[=E5=86=85=E5=AE=B9=E8=B0=83=E6=95=B4]=20?= =?UTF-8?q?=E9=99=90=E5=88=B6CI=E6=9E=84=E5=BB=BA=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E4=BB=85=E5=9C=A8main=E5=88=86=E6=94=AF=E8=A7=A6=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 05fbb6b..b3d0621 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -2,7 +2,7 @@ name: Build Windows App with Nuitka on: push: - branches: [ main, Dev ] + branches: [ main ] pull_request: branches: [ main ] -- Gitee From 1160c87bb52cb861a2b011c54a83de5e17106f1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E5=B1=B1=E5=85=AC=E4=BB=94?= Date: Sun, 12 Apr 2026 00:00:33 +0800 Subject: [PATCH 32/32] =?UTF-8?q?[=E5=86=85=E5=AE=B9=E8=B0=83=E6=95=B4]=20?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- version.py | 2 +- version.txt | 2 +- version_info.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/version.py b/version.py index 19fd09d..1934ce8 100644 --- a/version.py +++ b/version.py @@ -11,7 +11,7 @@ class VersionManager: self.minor: int = 7 self.patch: int = 1 self.build: int = 0 - self.prerelease: str = " · Beta" + self.prerelease: str = "" # 核心版本信息 self.version: str = f"{self.major}.{self.minor}.{self.patch}{self.prerelease}" diff --git a/version.txt b/version.txt index 97fa07d..ca466dc 100644 --- a/version.txt +++ b/version.txt @@ -1,5 +1,5 @@ 1.7.1 -2026.4.11.1 +2026.4.12.1 1.7.1.0 浮晓 HXiao Studio © 2026 浮晓 HXiao Studio diff --git a/version_info.txt b/version_info.txt index 0de25b6..5231f75 100644 --- a/version_info.txt +++ b/version_info.txt @@ -1,6 +1,6 @@ VSVersionInfo( ffi=FixedFileInfo( - filevers=(2026,4,11,1), + filevers=(2026,4,12,1), prodvers=(1,7,1,0), mask=0x3f, flags=0x0, -- Gitee