ui: fix text ellipsize
This commit is contained in:
parent
b2e94da457
commit
b32b226c77
2 changed files with 3 additions and 6 deletions
|
@ -222,10 +222,7 @@ impl ConnectionsContent {
|
||||||
// Draw connections URL.
|
// Draw connections URL.
|
||||||
ui.add_space(4.0);
|
ui.add_space(4.0);
|
||||||
let conn_text = format!("{} {}", COMPUTER_TOWER, conn.url);
|
let conn_text = format!("{} {}", COMPUTER_TOWER, conn.url);
|
||||||
ui.label(RichText::new(conn_text)
|
View::ellipsize_text(ui, conn_text, 15.0, Colors::TEXT);
|
||||||
.color(Colors::TEXT)
|
|
||||||
.size(15.0));
|
|
||||||
|
|
||||||
ui.add_space(1.0);
|
ui.add_space(1.0);
|
||||||
|
|
||||||
// Setup connection status text.
|
// Setup connection status text.
|
||||||
|
|
|
@ -68,7 +68,7 @@ impl View {
|
||||||
});
|
});
|
||||||
job.wrap = TextWrapping {
|
job.wrap = TextWrapping {
|
||||||
max_rows: 1,
|
max_rows: 1,
|
||||||
break_anywhere: false,
|
break_anywhere: true,
|
||||||
overflow_character: Option::from('﹍'),
|
overflow_character: Option::from('﹍'),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
@ -322,7 +322,7 @@ impl View {
|
||||||
});
|
});
|
||||||
job.wrap = TextWrapping {
|
job.wrap = TextWrapping {
|
||||||
max_rows: 1,
|
max_rows: 1,
|
||||||
break_anywhere: false,
|
break_anywhere: true,
|
||||||
overflow_character: Option::from('﹍'),
|
overflow_character: Option::from('﹍'),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue