From b90fb39f205c31191af27805d7e45873b78f0a00 Mon Sep 17 00:00:00 2001 From: LoipesMas <46327403+LoipesMas@users.noreply.github.com> Date: Fri, 21 Jan 2022 15:18:56 +0100 Subject: [PATCH] Correctly apply opacity to floating windows --- src/renderer/grid_renderer.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/renderer/grid_renderer.rs b/src/renderer/grid_renderer.rs index 577f716..19a6366 100644 --- a/src/renderer/grid_renderer.rs +++ b/src/renderer/grid_renderer.rs @@ -106,14 +106,14 @@ impl GridRenderer { .set_color(style.background(&self.default_style.colors).to_color()); } - // Only make background color transparent - if self.paint.color() == self.get_default_background() { - if is_floating { - self.paint - .set_alpha((255.0 * SETTINGS.get::().floating_opacity) as u8); - } else if (SETTINGS.get::().transparency - 1.0).abs() > f32::EPSILON { - self.paint.set_alpha(0); - } + if is_floating { + self.paint + .set_alpha((255.0 * SETTINGS.get::().floating_opacity) as u8); + } else if (SETTINGS.get::().transparency - 1.0).abs() > f32::EPSILON + // Only make background color transparent + && self.paint.color() == self.get_default_background() + { + self.paint.set_alpha(0); } canvas.draw_rect(region, &self.paint); }