Iris icon indicating copy to clipboard operation
Iris copied to clipboard

Window rounding

Open Sebastian2852 opened this issue 8 months ago • 1 comments

#99

Sebastian2852 avatar Apr 26 '25 00:04 Sebastian2852

Rounding is quite a large area, with a lot of specific edge cases. I think we should review the best options before commiting, as I would like to keep any changes this makes to a minimum, and not introduce separate instances for rounded versions or not. But you've done a good job at showcasing a solution to get this working.

The easiest solution would be to use a CanvasGroup, which would apply a corner effect to the entire window. However, I have found issues with it, especially in regards to resizing behaviour where it takes a frame or so to update, causing jittery behaviour, which I don't want Iris to have.

So if it's not possible to do that, then the only real option is to manually add UICorners to every element which could be rounded. Those are the overall window, (which affects the UIStroke), the TitleBar, MenuBar (if the TitleBar is hidden) and the ChildContainer, and the bottom resize grips. The problem is that we are unable to specify which corners to round, and I don't think it's appealing to choose to round all corners. To get around this, we would need to modify these instances to include some background to hide the rounding on certain corners.

The best option I can see is to round most of the widgets, and then introduce some sort of background layer, which will cover over the corners. I don't particularly want to add extra instances, but I guess there will need to be some sort of compromise.

SirMallard avatar May 03 '25 23:05 SirMallard