Correctly apply opacity to floating windows

macos-click-through
LoipesMas 3 years ago
parent 344b8ded67
commit b90fb39f20

@ -106,14 +106,14 @@ impl GridRenderer {
.set_color(style.background(&self.default_style.colors).to_color()); .set_color(style.background(&self.default_style.colors).to_color());
} }
// Only make background color transparent if is_floating {
if self.paint.color() == self.get_default_background() { self.paint
if is_floating { .set_alpha((255.0 * SETTINGS.get::<RendererSettings>().floating_opacity) as u8);
self.paint } else if (SETTINGS.get::<WindowSettings>().transparency - 1.0).abs() > f32::EPSILON
.set_alpha((255.0 * SETTINGS.get::<RendererSettings>().floating_opacity) as u8); // Only make background color transparent
} else if (SETTINGS.get::<WindowSettings>().transparency - 1.0).abs() > f32::EPSILON { && self.paint.color() == self.get_default_background()
self.paint.set_alpha(0); {
} self.paint.set_alpha(0);
} }
canvas.draw_rect(region, &self.paint); canvas.draw_rect(region, &self.paint);
} }

Loading…
Cancel
Save