mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-03 03:31:03 +02:00
fix(image): using fallback in places it shouldn't
This commit is contained in:
parent
1c68a97d33
commit
2367faab04
7 changed files with 27 additions and 15 deletions
|
@ -32,7 +32,7 @@ impl CustomWidget for ImageWidget {
|
|||
let icon_theme = context.icon_theme.clone();
|
||||
|
||||
dynamic_string(&self.src, move |src| {
|
||||
ImageProvider::parse(&src, &icon_theme, self.size)
|
||||
ImageProvider::parse(&src, &icon_theme, false, self.size)
|
||||
.map(|image| image.load_into_image(gtk_image.clone()));
|
||||
|
||||
Continue(true)
|
||||
|
|
|
@ -128,7 +128,7 @@ impl Module<gtk::Box> for FocusedModule {
|
|||
let icon_theme = icon_theme.clone();
|
||||
context.widget_rx.attach(None, move |(name, id)| {
|
||||
if self.show_icon {
|
||||
match ImageProvider::parse(&id, &icon_theme, self.icon_size)
|
||||
match ImageProvider::parse(&id, &icon_theme, true, self.icon_size)
|
||||
.map(|image| image.load_into_image(icon.clone()))
|
||||
{
|
||||
Some(Ok(_)) => icon.show(),
|
||||
|
|
|
@ -191,7 +191,7 @@ impl ItemButton {
|
|||
if appearance.show_icons {
|
||||
let gtk_image = gtk::Image::new();
|
||||
let image =
|
||||
ImageProvider::parse(&item.app_id.clone(), icon_theme, appearance.icon_size);
|
||||
ImageProvider::parse(&item.app_id.clone(), icon_theme, true, appearance.icon_size);
|
||||
if let Some(image) = image {
|
||||
button.set_image(Some(>k_image));
|
||||
button.set_always_show_image(true);
|
||||
|
|
|
@ -408,7 +408,7 @@ impl Module<Button> for MusicModule {
|
|||
if prev_cover != new_cover {
|
||||
prev_cover = new_cover.clone();
|
||||
let res = if let Some(image) = new_cover.and_then(|cover_path| {
|
||||
ImageProvider::parse(&cover_path, &icon_theme, image_size)
|
||||
ImageProvider::parse(&cover_path, &icon_theme, false, image_size)
|
||||
}) {
|
||||
image.load_into_image(album_image.clone())
|
||||
} else {
|
||||
|
|
|
@ -189,7 +189,7 @@ impl Module<gtk::Button> for UpowerModule {
|
|||
.attach(None, move |properties: UpowerProperties| {
|
||||
let format = format.replace("{percentage}", &properties.percentage.to_string());
|
||||
let icon_name = String::from("icon:") + &properties.icon_name;
|
||||
ImageProvider::parse(&icon_name, &icon_theme, self.icon_size)
|
||||
ImageProvider::parse(&icon_name, &icon_theme, false, self.icon_size)
|
||||
.map(|provider| provider.load_into_image(icon.clone()));
|
||||
label.set_markup(format.as_ref());
|
||||
Continue(true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue