zed icon indicating copy to clipboard operation
zed copied to clipboard

gpui: Add support for polychrome SVGs

Open aminya opened this issue 1 year ago • 1 comments

This allows the SVG renderer in Zed to respect the colors specified in the SVG file and not override them with the default monochrome color. This opens up the possibility of creating colorful file icons.

Related issues:

  • #8843
  • #4609
  • #6150
  • #5525

Release Notes:

  • N/A

aminya avatar Aug 22 '24 19:08 aminya

This doesn't seem to work as intended.

Here I am trying to render this SVG:

Screenshot 2024-08-23 at 11 42 41 AM

The red, green, and blue SVGs are using the existing monochrome SVG rendering.

The final one is rendering as a PolychromeSprite, but is coming out as black.

maxdeviant avatar Aug 23 '24 15:08 maxdeviant

I still don't see colorful icons in Zed and have no way to configure them. Not sure how this is solving anything if you then go and say we want to keep monochrome icons.

0xFlo avatar Aug 30 '24 10:08 0xFlo

The functionality in this PR doesn't seem to work, based on my testing.

Supporting polychrome SVGs in GPUI is something that we would be interested in supporting, but we're not at a point where we're ready to make use of that in Zed itself (until we start supporting third-party icons via extensions).

maxdeviant avatar Sep 03 '24 16:09 maxdeviant