mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-08-18 07:11:04 +02:00
refactor: move label truncate function to ext trait
Conflicts: src/gtk_helpers.rs src/modules/music/mod.rs
This commit is contained in:
parent
cc6f21ed68
commit
8b05ed526d
8 changed files with 44 additions and 35 deletions
|
@ -66,7 +66,7 @@ impl Module<GtkBox> for NetworkManagerModule {
|
|||
|
||||
let initial_icon_name = "content-loading-symbolic";
|
||||
ImageProvider::parse(initial_icon_name, &icon_theme, false, self.icon_size)
|
||||
.map(|provider| provider.load_into_image(icon.clone()));
|
||||
.map(|provider| provider.load_into_image(&icon));
|
||||
|
||||
let widget_receiver = context.subscribe();
|
||||
glib_recv!(widget_receiver, state => {
|
||||
|
@ -80,7 +80,7 @@ impl Module<GtkBox> for NetworkManagerModule {
|
|||
ClientState::Unknown => "dialog-question-symbolic",
|
||||
};
|
||||
ImageProvider::parse(icon_name, &icon_theme, false, self.icon_size)
|
||||
.map(|provider| provider.load_into_image(icon.clone()));
|
||||
.map(|provider| provider.load_into_image(&icon));
|
||||
});
|
||||
|
||||
Ok(ModuleParts::new(container, None))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue