Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Some SVG features aren't supported for SVG app icons

Đang mở
#92 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
csharp
Lĩnh vực
desktop

Hướng nghiên cứu

Bắt đầu bằng cách truy vết việc tải biểu tượng SVG của ứng dụng desktop Windows thông qua WinUI 3's SvgImageSource, sử dụng /icon/cursor.svg và /icon/code.svg làm các trường hợp tái hiện. Kiểm tra cách các phần tử được nhúng và các gradient được xử lý, sau đó xác minh rằng các biểu tượng bị ảnh hưởng được hiển thị chính xác mà không xảy ra lỗi im lặng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
C#
Star
29
Fork
12
Merge trung bình
4 giờ 15 phút
Pull request đã merge (30 ngày)
2

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của coder/coder-desktop-windows

Tất cả issue của coder/coder-desktop-windows

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.