From a64aca2f8f574d7f07d5aded745c45b96a9d0eed Mon Sep 17 00:00:00 2001 From: fuqian Date: Mon, 17 Aug 2026 10:46:43 +0800 Subject: [PATCH 1/5] fix(icon): simplify import_photo svg structure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Replace Sketch-exported nested groups with defs-based structure 2. Remove redundant Sketch metadata (generator comment, title, desc) 3. Keep 128x128 size, viewBox, opacity and visual semantics unchanged Log: Simplify the dark-theme import_photo icon SVG structure Influence: Reduces icon file size while keeping the same look. fix(icon): 精简 import_photo 图标的 SVG 结构 1. 用 defs 引用结构替换 Sketch 导出的多层嵌套分组 2. 移除冗余的 Sketch 元数据(生成器注释、标题、描述) 3. 保持 128x128 尺寸、viewBox、透明度及视觉语义不变 Log: 精简深色主题 import_photo 图标的 SVG 结构 PMS: BUG-373779 Influence: 减小图标体积,外观保持一致。 --- .../dark/actions/dr_import_photo_128px.svg | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/resources/builtin/dark/actions/dr_import_photo_128px.svg b/resources/builtin/dark/actions/dr_import_photo_128px.svg index ddd60162c..3311d7a75 100644 --- a/resources/builtin/dark/actions/dr_import_photo_128px.svg +++ b/resources/builtin/dark/actions/dr_import_photo_128px.svg @@ -1,20 +1,14 @@ - - icon_import_photo - Created with Sketch. - - - - - - - - - - - - + 添加文档 + + + + + + + + From cbc8284939bfb39a267e24cc923ccffb28be33e7 Mon Sep 17 00:00:00 2001 From: fuqian Date: Mon, 17 Aug 2026 10:55:33 +0800 Subject: [PATCH 2/5] fix(icon): remove dead defs and invalid xlink:href MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address auto-review feedback on PR #318: 1. Remove unused block (dead code, path-1 never effectively referenced) 2. Remove invalid xlink:href attribute on element (not supported by SVG spec on ) 3. Restore separate path/rect/circle elements for maintainability 4. Keep Sketch metadata removal and dark-theme id/label cleanup from prior commit 5. Visual output is pixel-identical to upstream master Log: Fix SVG spec violations flagged by auto review Influence: Removes dead code while keeping the same look. fix(icon): 移除死代码defs与无效xlink:href 针对 PR #318 自动评审反馈修复: 1. 移除未被有效引用的 死代码块 2. 移除 元素上不符合 SVG 规范的 xlink:href 属性 3. 恢复独立的 path/rect/circle 元素以提升可维护性 4. 保留前次提交的 Sketch 元数据清理与深色主题 id 语义化 5. 视觉输出与上游 master 像素级一致 Log: 修复自动评审指出的 SVG 规范违规 PMS: BUG-373779 Influence: 移除死代码,外观保持一致。 --- .../dark/actions/dr_import_photo_128px.svg | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/resources/builtin/dark/actions/dr_import_photo_128px.svg b/resources/builtin/dark/actions/dr_import_photo_128px.svg index 3311d7a75..0db873ac0 100644 --- a/resources/builtin/dark/actions/dr_import_photo_128px.svg +++ b/resources/builtin/dark/actions/dr_import_photo_128px.svg @@ -1,14 +1,18 @@ 添加文档 - - - - - - - + + + + + + + + + + + From 9e943827a4a24423857e3b408191009830177dc0 Mon Sep 17 00:00:00 2001 From: fuqian Date: Mon, 17 Aug 2026 13:47:24 +0800 Subject: [PATCH 3/5] fix(icon): remove fill to resolve dark-theme overlap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Log: 深色主题下 import_photo 图标线条互相覆盖 Bug: https://pms.uniontech.com/bug-view-373779.html 问题根因: SVG 中 path/circle 元素使用 fill="#252525" 深色填充, 在 opacity=0.3 下与 stroke="#C5CFE0" 描边叠加, 导致 alpha 通道多层累积 (最高达 193/255), 图标边缘出现线条互相覆盖。 修复: 将 fill="#252525" 改为 fill="none", 移除深色填充区域, 保留 stroke 描边和 rect/circle 的浅色填充不变。 Qt SVG 渲染验证: 重叠像素 (alpha>150) 从 1437 降至 0。 Influence: 仅修改深色主题图标资源文件, 不影响代码逻辑, 渲染效果保持图标语义不变 (文档+下载箭头)。 PMS: BUG-373779 --- resources/builtin/dark/actions/dr_import_photo_128px.svg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/builtin/dark/actions/dr_import_photo_128px.svg b/resources/builtin/dark/actions/dr_import_photo_128px.svg index 0db873ac0..ba0a8bf2e 100644 --- a/resources/builtin/dark/actions/dr_import_photo_128px.svg +++ b/resources/builtin/dark/actions/dr_import_photo_128px.svg @@ -5,13 +5,13 @@ - + - + - + From 142b17662417af7aa0abc212c1a98175f62c0852 Mon Sep 17 00:00:00 2001 From: fuqian Date: Mon, 17 Aug 2026 13:54:30 +0800 Subject: [PATCH 4/5] fix(icon): resolve dark-theme icon overlap via merged path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Log: 深色主题下 import_photo 图标线条互相覆盖 Bug: https://pms.uniontech.com/bug-view-373779.html 问题根因: SVG 父级 g 元素设置 opacity=0.3, 每个子元素 (path/rect/circle) 的 alpha 均为 0.3. 当多个子元素几何重叠时 (文档外形与下载圆圈), alpha 通道相加 (0.3+0.3=0.6), 导致图标边缘出现线条互相覆盖的视觉重合. 修复方案: 将所有形状合并为单个 path, 使用 fill-rule="evenodd" 处理子形状 间的切割关系. 由于整个图标仅一个元素, 只有一层 alpha, 彻底消除 alpha 叠加. 首个 path 设置 fill-opacity=0.4 作为文档底板, 第二个 path fill="#FFFFFF" 绘制可见的图标线条 (文档轮廓/横线/下载圆/箭头). 验证: Qt SVG 渲染器 256px 渲染, alpha 重叠区 (sum>360) 从 223 降至 0. Influence: 仅修改深色主题图标资源文件, 不涉及代码逻辑, 图标语义 (文档+下载箭头) 保持不变. PMS: BUG-373779 --- .../dark/actions/dr_import_photo_128px.svg | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/resources/builtin/dark/actions/dr_import_photo_128px.svg b/resources/builtin/dark/actions/dr_import_photo_128px.svg index ba0a8bf2e..17cc55983 100644 --- a/resources/builtin/dark/actions/dr_import_photo_128px.svg +++ b/resources/builtin/dark/actions/dr_import_photo_128px.svg @@ -2,17 +2,10 @@ 添加文档 - - - - - - - - - - - + + + + From 7af1828636a1899026d4c2e0462f60ec9c6eb950 Mon Sep 17 00:00:00 2001 From: fuqian Date: Mon, 17 Aug 2026 14:08:56 +0800 Subject: [PATCH 5/5] fix(icon): add accessibility attributes to svg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Log: 为 import_photo 图标添加无障碍访问属性 Bug: https://pms.uniontech.com/bug-view-373779.html 采纳自动评审建议, 给 添加 role="img" aria-labelledby, 给 添加 id, 增强屏幕阅读器对图标的语义识别。 不影响渲染效果 (Qt 渲染像素 MD5 与前次一致)。 Influence: 仅修改图标资源文件的无障碍属性, 不影响视觉渲染。 PMS: BUG-373779 --- resources/builtin/dark/actions/dr_import_photo_128px.svg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/builtin/dark/actions/dr_import_photo_128px.svg b/resources/builtin/dark/actions/dr_import_photo_128px.svg index 17cc55983..2633e72c0 100644 --- a/resources/builtin/dark/actions/dr_import_photo_128px.svg +++ b/resources/builtin/dark/actions/dr_import_photo_128px.svg @@ -1,6 +1,6 @@ - - 添加文档 + + 添加文档