Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Some SVG features aren't supported for SVG app icons

未关闭
#92 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
csharp
领域
desktop

调研方向

首先,通过 WinUI 3's SvgImageSource 跟踪 Windows 桌面应用的 SVG 图标加载过程,并使用 /icon/cursor.svg 和 /icon/code.svg 作为复现案例。检查嵌入的 元素和渐变的处理方式,然后验证受影响的图标能够正确渲染,且不会静默失败。

由索引模型根据 Issue 内容生成。

描述

Embedded bitmaps

Some SVG files are actually PNGs masquerading as SVGs.

Take for example /icon/cursor.svg in Coder:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="36" height="36" fill="none">
  <path fill="url(#a)" d="M0 0h36v36H0z"/>
  <defs>
    <pattern id="a" width="1" height="1" patternContentUnits="objectBoundingBox">
      <use xlink:href="#b" transform="scale(.0005)"/>
    </pattern>
    <image xlink:href="data:image/png;base64,iVBOR..." id="b" width="2000" height="2000"/>
  </defs>
</svg>

WinUI 3's SvgImageSource doesn't seem to be able to render <image> tags like these in SVGs, so cursor.svg shows up as blank.

There's no way to detect that it failed to render as it fails silently.

VS Code Icon gradient

The VS Code icon /icon/code.svg has a weird white gradient over it in the app that doesn't appear when viewing the SVG in a web browser.

Image


We could fix all of the SVGs in Coder and just declare that the desktop app for windows can't render icons like these somewhere in our documentation or something, or we could parse the SVG to look for these tags and try to render as a BitmapImage instead.

Relates to #91

主要语言
C#
星标
29
派生
12
平均合并
4 小时 15 分钟
30 天内合并 PR
2

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

coder/coder-desktop-windows 的其他 Issue

查看 coder/coder-desktop-windows 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。