cogentcore / core

A free and open source framework for building powerful, fast, and elegant 2D and 3D apps that run on macOS, Windows, Linux, iOS, Android, and the Web with a single pure Go codebase, allowing you to Code Once, Run Everywhere.
http://cogentcore.org/core
BSD 3-Clause "New" or "Revised" License
1.32k stars 71 forks source link

Support generating constants for custom icons #849

Closed kkoreilly closed 4 months ago

kkoreilly commented 5 months ago

Describe the feature

Like those in the main icons package.

Relevant code

No response

kkoreilly commented 4 months ago

We will not implement this as a general tool, as adding custom icons is a very infrequent use case, and even when it does happen, it is typically only used for icons that are only used once in a specific place, in which case the constant is pointless. Furthermore, the way the generator is currently structured, it directly uses an embedded fs, which means that it can't easily work as a more general-purpose thing. In the rare case that this is needed, people can copy and adopt the code to their specific use case. We may revisit this decision in the context of #515 and other internationalization-related issues.