Set radius for each window's corner #4386
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe your PR, what does it fix/add?
This PR opens a possibility to define a radius for each window's corner separately. This can come as a new way for ricing Hyprland in combination of modified
hyprwm/hyprland-plugins/hyprbars
(please don't judge color scheming, I set them to have a high contrast).As you can see window has rounded corners only at the bottom and hyprbars only at the top. They become more unified and it actually seems like
hyprbars
is part of the window.Rounding has additional definition:
Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
However it is not done yet and there are still some issues. For example: window border isn't part of the bar (in picture set to size 7) as it still renders around the original window and not around
hyprbars
.On top of that as you can see (in highlighted red rectangle) the border is rounded even though radius is set to
0
. To keep it consistent there shouldn't be any rounding.When merged it will break
hyprwm/hyprland-plugins/hyprbars
andhyprwm/hyprland-plugins/borders-plus-plus
as they rely onCWindow::rounding()
and not the changedCWindow::getCornerRadii()
.Also I'm not sure if substraction box for renderdata.damage has correct values. I've left a
TODO
comment there.Is it ready for merging, or does it need work?
PR is not ready for merging. I just wanted to see if it's a valid feature to add into
Hyprland
and if there's any interest for it.If it will be decided to merge this, I'll make another PR into
hyprwm/hyprland-plugins
to fix compatibility and rounding.