feat: add blur and spread to effects configuration#67
feat: add blur and spread to effects configuration#67lukeyou05 merged 1 commit intolukeyou05:mainfrom
blur and spread to effects configuration#67Conversation
|
Thanks for the PR. I have a couple thoughts: This seems to just add some CSS-style spread which is something I'm happy to incorporate and actually seems to be what Hyprland does as well, but imo it really shouldn't be forced on others and should instead be made optional just like it is in CSS, niri, and also Hyprland to an extent, especially to avoid messing with people's existing configs. If you're willing, could you add a separate field called let blur_amount = (effect_params.std_dev / 2.0).max(1.0);
blur_effect
.SetValue(
D2D1_GAUSSIANBLUR_PROP_STANDARD_DEVIATION.0 as u32,
D2D1_PROPERTY_TYPE_FLOAT,
&blur_amount.to_le_bytes(),
)
.windows_context("glow_blur_effect.SetValue() std deviation")?;I would also suggest NOT setting I'm also not sure I consider this a bug fix in the first place since the prior behavior is expected, and the new behavior is more of a subjective improvement because not everyone prefers the same |
Add a separate 'spread' field to control morphology dilation independently from blur (std_dev). This preserves corner shapes when spread > 0 while maintaining backwards compatibility (spread defaults to 0). Changes: - Add 'spread' field to EffectParams and EffectParamsConfig with #[serde(default)] - Morphology dilation only applied when spread > 0 - Use std_dev as-is for blur (not halved) - Update window_padding calculations to include spread - Add 'blur' as config alias for 'radius' (backwards compatible) Closes lukeyou05#64
79553ef to
40e7d0b
Compare
Oh yeah I didnt approach like this in the first place thinking that it wasn't the behavior and I was completely wrong lmao. Yeah, its better to re-title the PR from a And yes, I really wish I could get back to Linux as well, it's just that I don't want to break my system everytime as I love using Hyprland but it's known for its breaking changes which kind of forces me to go back to Windows and also the gaming support is getting good as far as I've heard but it's just not there yet. If everything is all set, at least for the tools I use, I'll be back to it without a second thought. But before that we gotta finish both the PRs 😄 |
blur and spread to effects configuration
|
@lukeyou05 I have done implementing the Configuration example: effects:
active:
- type: Shadow
blur: 2
spread: 8
opacity: 0.8
inactive:
- type: Glow
blur: 2
spread: 8
opactiy: 0.5unfortunately it might break the current default configuration but for that in the earlier commit, I have left |
|
Looks good. Thank you! |
|
Happy to work on this :) Now to the next PR #66 (not done yet lol, hopefully by this week) |


Replace Gaussian blur with morphology-based approach to preserve corner shapes.
Changes:
Shadow: morphology (dilate) + color matrix (black) + light blur
Glow: morphology (dilate) + light blur (keeps border color)
Add 'blur' as config alias for 'radius' (backwards compatible)
The morphology dilation expands the shape while preserving corner geometry,
then a light Gaussian blur softens edges for natural effect appearance.
Fixes #64