Add configurable blur

macos-click-through
MultisampledNight 3 years ago
parent e2e4f5a744
commit 4b264afa48
No known key found for this signature in database
GPG Key ID: C81EF9B053977241

@ -35,6 +35,7 @@ pub struct RendererSettings {
scroll_animation_length: f32,
floating_opacity: f32,
floating_blur: bool,
floating_blur_amount: f32,
debug_renderer: bool,
profiler: bool,
}
@ -46,6 +47,7 @@ impl Default for RendererSettings {
scroll_animation_length: 0.3,
floating_opacity: 0.7,
floating_blur: true,
floating_blur_amount: 2.0,
debug_renderer: false,
profiler: false,
}

@ -255,7 +255,13 @@ impl RenderedWindow {
}
if self.floating_order.is_some() && settings.floating_blur {
let blur = blur((2.0, 2.0), None, None, None).unwrap();
let blur = blur(
(settings.floating_blur_amount, settings.floating_blur_amount),
None,
None,
None,
)
.unwrap();
let save_layer_rec = SaveLayerRec::default()
.backdrop(&blur)
.bounds(&pixel_region);

Loading…
Cancel
Save