refactor: consolidate shared ui helpers and prune unused code

This commit is contained in:
2026-11-22 18:23:21 +07:00
parent 4a72f2b4a0
commit 9daee9d54d
82 changed files with 3607 additions and 7184 deletions
+11 -11
View File
@@ -150,17 +150,6 @@ pub struct Icon {
rotation_period: Option<Duration>,
}
/// Creates an icon for the role at the default size.
pub fn icon(role: IconRole) -> Icon {
Icon {
glyph: Glyph::Role(role),
size: AbsoluteLength::Rems(DEFAULT_ICON_SIZE),
color: None,
transformation: None,
rotation_period: None,
}
}
impl Icon {
/// Creates an icon from an application-defined icon set.
pub fn named<I>(named: I) -> Self
@@ -306,3 +295,14 @@ impl AssetSource for Assets {
.collect())
}
}
/// Creates an icon for the role at the default size.
pub fn icon(role: IconRole) -> Icon {
Icon {
glyph: Glyph::Role(role),
size: AbsoluteLength::Rems(DEFAULT_ICON_SIZE),
color: None,
transformation: None,
rotation_period: None,
}
}