Repository navigation
[Wasm] Fix rectangle clipping regression - #599
Conversation
| // Disable clipping for Scrollviewer (edge seems to disable scrolling if | ||
| // the clipping is enabled to the size of the scrollviewer, even if overflow-y is auto) | ||
| var clip = this is Controls.ScrollViewer ? (Rect?)null : new Rect(0, 0, newRect.Width, newRect.Height); | ||
| Rect? getClip() |
There was a problem hiding this comment.
Why do you create a delegate for that ?
There was a problem hiding this comment.
... more than a delegate: a display class capturing this.
There was a problem hiding this comment.
It's not a delegate, it's a local function. But it's that or a triple-if with a local variable... I want C# expression pattern matching :(
There was a problem hiding this comment.
Yes you're right it's a local function ... which will be translated as a display class by the compiler, like if you have declared a delegate 🤓
When do we update to C# 8 ?
There was a problem hiding this comment.
Nope, it's not a like a delegate, there's no indirection, there's a display class, but that's it.
I wrote something like this originally:
var clip = this is Controls.ScrollViewer ? (Rect?)null : Clip != null ? Clip.Rect : new Rect(0, 0, newRect.Width, newRect.Height);
because having to write Rect clip; then a bunch of if else, is not particularly nice either...
| // Disable clipping for Scrollviewer (edge seems to disable scrolling if | ||
| // the clipping is enabled to the size of the scrollviewer, even if overflow-y is auto) | ||
| var clip = this is Controls.ScrollViewer ? (Rect?)null : new Rect(0, 0, newRect.Width, newRect.Height); | ||
| Rect? getClip() |
There was a problem hiding this comment.
... more than a delegate: a display class capturing this.
Inner rectange SVG is now clipped properly since #594, but the rectangle needs a larger clipping area.
3062eb1 to
68da803
Compare
chore: Update Uno packages
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Rectangles are clipped incorrectly.
What is the new behavior?
Inner rectange SVG is now clipped properly since #594, but the rectangle needs a larger clipping area. The clipping property is now applied properly, if there's one.
PR Checklist
Please check if your PR fulfills the following requirements:
Other information
Internal Issue (If applicable):