Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] Fix Border content position and clipping #6472

Merged
merged 2 commits into from
Apr 26, 2022

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
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 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
2 participants