Skip to content

Commit

Permalink
fix(bar): use truncated labels for titles
Browse files Browse the repository at this point in the history
  • Loading branch information
LGUG2Z committed Sep 21, 2024
1 parent 1080159 commit 4585a5d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions komorebi-bar/src/komorebi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 4585a5d

Please sign in to comment.