1
0
Fork 0
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:
Jake Stanger 2023-01-28 23:01:44 +00:00
parent 97502559b3
commit 07dbf78010
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
6 changed files with 77 additions and 61 deletions

View file

@ -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);