mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-04-19 19:34:24 +02:00
refactor: explicitly use set_text
on non-pango labels
This commit is contained in:
parent
9d8a3eb370
commit
b8fdd8531e
5 changed files with 5 additions and 5 deletions
|
@ -165,7 +165,7 @@ impl Module<gtk::Box> for FocusedModule {
|
|||
|
||||
if self.show_title {
|
||||
label.show();
|
||||
label.set_label(&name);
|
||||
label.set_text(&name);
|
||||
}
|
||||
} else {
|
||||
icon.hide();
|
||||
|
|
|
@ -473,7 +473,7 @@ impl Module<Button> for MusicModule {
|
|||
if let (Some(elapsed), Some(duration)) =
|
||||
(progress_tick.elapsed, progress_tick.duration)
|
||||
{
|
||||
progress_label.set_label(&format!(
|
||||
progress_label.set_text(&format!(
|
||||
"{}/{}",
|
||||
format_time(elapsed),
|
||||
format_time(duration)
|
||||
|
|
|
@ -209,7 +209,7 @@ impl Module<Overlay> for NotificationsModule {
|
|||
let icon = self.icons.icon(ev);
|
||||
button.set_label(icon);
|
||||
|
||||
label.set_label(&ev.count.to_string());
|
||||
label.set_text(&ev.count.to_string());
|
||||
label.set_visible(self.show_count && ev.count > 0);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ impl TrayMenu {
|
|||
label.show();
|
||||
label
|
||||
})
|
||||
.set_label(text);
|
||||
.set_text(text);
|
||||
}
|
||||
|
||||
/// Shows the label, using its current text.
|
||||
|
|
|
@ -432,7 +432,7 @@ impl Module<Button> for VolumeModule {
|
|||
}
|
||||
Event::UpdateInput(info) => {
|
||||
if let Some(ui) = inputs.get(&info.index) {
|
||||
ui.label.set_label(&info.name);
|
||||
ui.label.set_text(&info.name);
|
||||
ui.slider.set_value(info.volume);
|
||||
ui.slider.set_sensitive(info.can_set_volume);
|
||||
ui.btn_mute.set_label(if info.muted { &self.icons.muted } else { self.icons.volume_icon(info.volume) });
|
||||
|
|
Loading…
Add table
Reference in a new issue