KEMBAR78
[Windows] Fix Border content position and clipping by jsuarezruiz · Pull Request #6472 · dotnet/maui · GitHub
Skip to content

Conversation

@jsuarezruiz
Copy link
Contributor

@jsuarezruiz jsuarezruiz commented Apr 25, 2022

Description of Change

This PR introduce changes in the Windows Border to:

  • Fix incorrect positioning of content.
  • Clip the content.

border-clip-windows

Issues Fixed

Fixes #3471
Fixes #5928

@jsuarezruiz jsuarezruiz added t/bug Something isn't working platform/windows area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing labels Apr 25, 2022
Content.RenderTransform = new TranslateTransform() { X = -strokeThickness, Y = -strokeThickness };
}

void UpdateClip(IShape? borderShape)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main change for Clipping.


var strokeThickness = _borderPath.StrokeThickness;

Content.RenderTransform = new TranslateTransform() { X = -strokeThickness, Y = -strokeThickness };
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main change to fix the wrong positioning.

@jsuarezruiz jsuarezruiz requested a review from Redth April 25, 2022 14:28
@Redth
Copy link
Member

Redth commented Apr 25, 2022

@jsuarezruiz corner radius on that sample seems broken in this PR

@jsuarezruiz
Copy link
Contributor Author

@jsuarezruiz corner radius on that sample seems broken in this PR

Thanks for the feedback. Could you review it again?
border-clip-windows-2

@Redth Redth merged commit 932a2c2 into main Apr 26, 2022
@Redth Redth deleted the clip-border-content-windows branch April 26, 2022 18:48
@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2023
@samhouts samhouts added the fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3! platform/windows t/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[mauipalooza] Border doesn't contain or wrap image Border content alignment not centered on Windows

3 participants