Vixen
02b45cc4
csharp
public readonly record struct IconPaint

What one path of an icon is painted with.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

⚠ A struct with a kind rather than a nullable colour, because "inherit" is not a colour. The distinction that matters is between a path that will follow the theme and one that will not, and a Color4 cannot carry it — which is how an icon set ends up with the theme's foreground baked in as a literal that stops inverting the day somebody switches to a light theme.

Fields and properties (5)

  • public IconPaintKind Kind

    Which of the three cases this is.

  • public string Token

    The custom property, for Token. Empty otherwise.

  • public Color4 Color

    The colour, for Literal.

  • public static IconPaint None

    Nothing is drawn.

  • public static IconPaint Foreground

    The element's inherited color, which follows the theme.

Methods (2)

  • public static IconPaint Named(string token)

    A colour the cascade supplies.

  • public static IconPaint Of(Color4 color)

    A colour written into the icon, which does not follow the theme.

Used by (10)

  • IconVixen.Ui.Controls
  • IconArtVixen.Ui.Controls
  • IconArtTestsVixen.Ui.Controls.Tests
  • IconPathVixen.Ui.Controls
  • EditorIconAttributeVixen.Editor.Ui
  • IconContributionTestsVixen.Editor.App.Tests
  • MaterialIconsVixen.Editor.App
  • ModeArtVixen.Editor.Ui
  • OutOfTreePluginTestsVixen.Editor.App.Tests
  • TerrainModuleVixen.Editor.Terrain