diff --git a/src/display.rs b/src/display.rs index 413d3b5..385ee18 100644 --- a/src/display.rs +++ b/src/display.rs @@ -455,7 +455,10 @@ impl EventHandler for MPDDisplay { self.album_art = None; self.album_art_draw_transform = None; } else { - self.get_album_art_transform(ctx, true); + self.get_album_art_transform( + ctx, + !self.opts.do_not_fill_scale_album_art, + ); } } else { self.album_art = None; @@ -576,7 +579,7 @@ impl EventHandler for MPDDisplay { } fn resize_event(&mut self, ctx: &mut Context, _width: f32, _height: f32) { - self.get_album_art_transform(ctx, true); + self.get_album_art_transform(ctx, !self.opts.do_not_fill_scale_album_art); self.refresh_text_transforms(ctx) .expect("Failed to set text transforms"); } diff --git a/src/main.rs b/src/main.rs index 70c8b16..0b0c142 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,6 +30,11 @@ pub struct Opt { disable_show_filename: bool, #[structopt(long = "pprompt", help = "input password via prompt")] enable_prompt_password: bool, + #[structopt( + long = "no-scale-fill", + help = "don't scale-fill the album art to the window" + )] + do_not_fill_scale_album_art: bool, } fn main() -> Result<(), String> {