coder / coder/coder-desktop-windows

Some SVG features aren't supported for SVG app icons

未关闭
#92 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C#
星标
26
派生
12
平均合并
6 小时 50 分钟
30 天内合并 PR
1

描述

### Embedded bitmaps

Some SVG files are actually PNGs masquerading as SVGs.

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

```

WinUI 3's `SvgImageSource` doesn't seem to be able to render `` 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](https://github.com/user-attachments/assets/4ace5cbd-97ca-4a96-a275-3bcceedfe0a1)

-----

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

贡献指南

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

调研方向

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

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

评估

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

把新 issue 发到你的邮箱

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