Conversation
| int corner_detail = 8; | ||
| int shadow_size = 0; | ||
| Point2 shadow_offset; | ||
| bool anti_aliased_force = false; |
There was a problem hiding this comment.
Should be:
| bool anti_aliased_force = false; | |
| bool force_anti_aliased = false; |
For the methods as well
There was a problem hiding this comment.
The problem is that it is odd English, but for the property it can be fine but the methods should be changed at least they are fully invalid
|
I think some version of this is needed, but I think the cleaner way would be to only apply the aa when needed, ie when the panel is rotated. This “force” attribute only makes sense if you have a detailed understanding of the sbf implementation, otherwise it just adds on another layer of confusion. (And if we’d have to add this I’d honestly prefer a project-level setting instead of doing it per stylebox.) (Alternatively, having a toggle called “only apply when corners are rounded” that’s on by default, would be less confusing (but still messy)) |
I did consider this, but like you said it's not necessarily possible. Also, it would mean you still couldn't have antialiasing when there is no rotation (sometimes useful if you have a panel with rounded corners and a panel with sharp corners next to each other, and you want them to look consistent. Or if you are going to tween the rotation from zero and don't want it to suddenly become blurry.)
I think they already rejected this, because it would be a breaking change, and since antialiasing is on by default, it would cause performance reductions and blurriness in existing projects.
It may indeed be better to be reversed, but it would have to be something like |
I hadn't considered that there is a visible difference between un-rotated, un-skewed panels with straight corners when aa is applied vs not. I guess that would make it a breaking change. It's a pity though, because Imo it is one of the things that makes SBF feel kinda inconsistent.
Maybe we could just do "Optimize" or something similar? With a warning and explanation in the tooltip? |

What problem(s) does this PR solve?
Screenshots
The force property in the inspector when anti-aliasing is disabled:
The force property in the inspector when anti-aliasing is enabled:
The panel when anti-aliasing is enabled and force is disabled:
The panel when anti-aliasing is enabled and force is enabled:
Additional information
There are several ways I can think of to achieve the same thing, but this way seems the cleanest and simplest.
No AI used.