Merge pull request #1165 from LoipesMas/transparency

Correctly apply opacity to floating windows
macos-click-through
LoipesMas 3 years ago committed by GitHub
commit 8682680c79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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