From 067373d50fdc58d8eddb596b284fa8b1b066b22d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sosth=C3=A8ne=20Gu=C3=A9don?= Date: Fri, 8 Aug 2025 18:31:04 +0200 Subject: [PATCH] Fix icon size in about widget The icon is made to use 128px, the same size as before, and now also shrinks in case the window is too small to fit the entire icon. Fixes #937 --- src/widget/about.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/widget/about.rs b/src/widget/about.rs index 6590bb9d..13fcea23 100644 --- a/src/widget/about.rs +++ b/src/widget/about.rs @@ -137,7 +137,13 @@ pub fn about<'a, Message: Clone + 'static>( }; let application_name = about.name.as_ref().map(widget::text::title3); - let application_icon = about.icon.as_ref().map(|i| i.clone().icon()); + let application_icon = about.icon.as_ref().map(|i| { + i.clone() + .icon() + .content_fit(iced::ContentFit::Contain) + .width(Length::Fixed(128.)) + .height(Length::Fixed(128.)) + }); let author = about.author.as_ref().map(widget::text::body); let version = about.version.as_ref().map(widget::button::standard); let links_section = section(&about.links, "Links");