From 4585a5d0350cc4d9bc39e6b485b3fe7eb015e80e Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sat, 21 Sep 2024 10:20:26 -0700 Subject: [PATCH] fix(bar): use truncated labels for titles --- komorebi-bar/src/komorebi.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/komorebi-bar/src/komorebi.rs b/komorebi-bar/src/komorebi.rs index bc221eee..57388348 100644 --- a/komorebi-bar/src/komorebi.rs +++ b/komorebi-bar/src/komorebi.rs @@ -295,12 +295,17 @@ impl BarWidget for Komorebi { ); if titles.len() > 1 { - ui.add(Label::new(layout_job).selectable(false)); + ui.add(Label::new(layout_job).selectable(false).truncate()); } else { - ui.add(Label::new(title).selectable(false)); + ui.add(Label::new(title).selectable(false).truncate()); } } else if ui - .add(Label::new(title).selectable(false).sense(Sense::click())) + .add( + Label::new(title) + .selectable(false) + .sense(Sense::click()) + .truncate(), + ) .clicked() { if komorebi_client::send_message(&SocketMessage::MouseFollowsFocus(false))