mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-08-17 14:51:04 +02:00
feat(focused): ability to truncate label text
This commit is contained in:
parent
97502559b3
commit
07dbf78010
6 changed files with 77 additions and 61 deletions
|
@ -165,13 +165,7 @@ impl Module<Button> for MusicModule {
|
|||
label.set_angle(info.bar_position.get_angle());
|
||||
|
||||
if let Some(truncate) = self.truncate {
|
||||
println!("{truncate:?}");
|
||||
|
||||
label.set_ellipsize(truncate.mode().into());
|
||||
|
||||
if let Some(max_length) = truncate.length() {
|
||||
label.set_max_width_chars(max_length);
|
||||
}
|
||||
truncate.truncate_label(&label);
|
||||
}
|
||||
|
||||
button.add(&label);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue