Derive icon paths (#17816)

This PR improves adding and working with icons by using the new
`DerivePathStr` to derive icon paths.

This means paths no longer need to be manually specified, and the
`IconName` and file name will always be consistent between icons.

This PR does not do any work to standardize icons visually, remove
unused icons, or any other such cleanup.

Release Notes:

- N/A
This commit is contained in:
Nate Butler 2024-09-13 21:12:29 -04:00 committed by GitHub
parent ce848375fe
commit e8a2dd92c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 96 additions and 226 deletions

View file

@ -30,7 +30,7 @@ impl Render for DiagnosticIndicator {
(0, warning_count) => h_flex()
.gap_1()
.child(
Icon::new(IconName::ExclamationTriangle)
Icon::new(IconName::Warning)
.size(IconSize::Small)
.color(Color::Warning),
)
@ -52,7 +52,7 @@ impl Render for DiagnosticIndicator {
)
.child(Label::new(error_count.to_string()).size(LabelSize::Small))
.child(
Icon::new(IconName::ExclamationTriangle)
Icon::new(IconName::Warning)
.size(IconSize::Small)
.color(Color::Warning),
)