Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSVGIconImageList doesn't load the icon colours for all icons #269

Open
EricWex opened this issue Jan 24, 2024 · 1 comment
Open

TSVGIconImageList doesn't load the icon colours for all icons #269

EricWex opened this issue Jan 24, 2024 · 1 comment

Comments

@EricWex
Copy link

EricWex commented Jan 24, 2024

Block Change
Swap (1)

The Style tag inside the error prone SVG files has a certain property named stroke-width: 0px. This property is always shared between a number of classes, e.g.:
Image

The position of this style is what causes the icons to misbehave. If I shift this style to be the last style in the file's Style tag, the colours render correctly:

Image

Funny enough, the images display fine without any modifications in a browser, and in the File Explorer Preview Pane.

Here are the code

<style> .cls-1 { fill: #999; }
  .cls-1, .cls-2, .cls-3, .cls-4 {
    stroke-width: 0px;
  }

  .cls-2 {
    fill: #0071bc;
  }

  .cls-3 {
    fill: #ccc;
  }

  .cls-4 {
    fill: #fff;
  }
</style>

and this is our fix

<style> .cls-1 { fill: #999; }
  .cls-2 {
    fill: #0071bc;
  }

  .cls-3 {
    fill: #ccc;
  }

  .cls-4 {
    fill: #fff;
  }
</style>
.cls-1, .cls-2, .cls-3, .cls-4 { stroke-width: 0px; }
@carloBarazzetta
Copy link
Contributor

it's a problems inside the Image32 engine... You must open the issue in the https://github.com/AngusJohnson/Image32 repo.
When Angus Johnson resolve the problem you can replace your units into Image32\Source units of this project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants