ui: fix text ellipsize

This commit is contained in:
ardocrat 2023-08-09 02:51:50 +03:00
parent b2e94da457
commit b32b226c77
2 changed files with 3 additions and 6 deletions

View file

@ -222,10 +222,7 @@ impl ConnectionsContent {
// Draw connections URL.
ui.add_space(4.0);
let conn_text = format!("{} {}", COMPUTER_TOWER, conn.url);
ui.label(RichText::new(conn_text)
.color(Colors::TEXT)
.size(15.0));
View::ellipsize_text(ui, conn_text, 15.0, Colors::TEXT);
ui.add_space(1.0);
// Setup connection status text.

View file

@ -68,7 +68,7 @@ impl View {
});
job.wrap = TextWrapping {
max_rows: 1,
break_anywhere: false,
break_anywhere: true,
overflow_character: Option::from(''),
..Default::default()
};
@ -322,7 +322,7 @@ impl View {
});
job.wrap = TextWrapping {
max_rows: 1,
break_anywhere: false,
break_anywhere: true,
overflow_character: Option::from(''),
..Default::default()
};