Show labels beside About link icons

This commit is contained in:
Dylan M. Taylor
2026-11-21 15:25:03 -05:00
parent 0cfe8611e1
commit 31bed444bb
2 changed files with 3 additions and 3 deletions
@@ -335,7 +335,7 @@ impl Shown<'_> {
Text::new("·").shade(Shade::Faint).show(ui);
}
let activated = if let Some(icon) = &item.icon {
clicked(&IconButton::new(icon.clone()).label(item.label.clone()).tooltip(item.label.clone()).id_salt(("link", at)).show(ui))
clicked(&Button::new(item.label.clone()).icon(icon.clone()).variant(Variant::GHOST).id_salt(("link", at)).show(ui))
} else {
clicked(&Link::new(item.label.clone()).id_salt(("link", at)).show(ui))
};
@@ -12,7 +12,7 @@ pub struct AboutLink {
pub label: Label,
/// The target URL, reported in the output for the app to open.
pub url: String,
/// An icon to show in place of link text, with the label retained for accessibility.
/// An icon to show beside the link text.
pub icon: Option<craft_behavior::IconId>,
}
@@ -22,7 +22,7 @@ impl AboutLink {
AboutLink { label: label.into(), url: url.into(), icon: None }
}
/// Shows this link as an icon button.
/// Shows this link with an icon beside its label.
#[must_use]
pub fn icon(mut self, icon: craft_behavior::IconId) -> Self {
self.icon = Some(icon);