From c6004b67e594b3e6d4fc6414dd45fe809a367ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vuka=C5=A1in=20Vojinovi=C4=87?= <150025636+git-f0x@users.noreply.github.com> Date: Tue, 9 Jul 2024 15:13:48 +0200 Subject: [PATCH] fix(app-list): toplevel name ellipsizing --- cosmic-app-list/src/app.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cosmic-app-list/src/app.rs b/cosmic-app-list/src/app.rs index 13dfbe37..9d7f3e1c 100755 --- a/cosmic-app-list/src/app.rs +++ b/cosmic-app-list/src/app.rs @@ -1481,8 +1481,8 @@ impl cosmic::Application for CosmicAppList { if !toplevels.is_empty() { let mut list_col = column![]; for (handle, info, _) in toplevels { - let title = if info.title.len() > 20 { - format!("{:.24}...", &info.title) + let title = if info.title.len() > 32 { + format!("{:.30}...", &info.title) } else { info.title.clone() }; @@ -1521,8 +1521,8 @@ impl cosmic::Application for CosmicAppList { .align_items(Alignment::Center) .spacing(8); for (handle, info, img) in toplevels { - let title = if info.title.len() > 26 { - format!("{:.23}...", &info.title) + let title = if info.title.len() > 18 { + format!("{:.16}...", &info.title) } else { info.title.clone() }; @@ -1539,8 +1539,8 @@ impl cosmic::Application for CosmicAppList { let mut content = row![].padding(8).align_items(Alignment::Center).spacing(8); for (handle, info, img) in toplevels { - let title = if info.title.len() > 26 { - format!("{:.23}...", &info.title) + let title = if info.title.len() > 18 { + format!("{:.16}...", &info.title) } else { info.title.clone() };