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

Revert "[Windows] Fix default corner radius on Button" #10664

Merged
merged 4 commits into from
Oct 17, 2022

Conversation

tj-devel709
Copy link
Member

@tj-devel709 tj-devel709 commented Oct 13, 2022

Reverts #9515

#9515 Allows all the platforms to have the same default button border radius, but we want to keep the Windows default rounded corner style on buttons. Thanks @mattleibow and @PureWeen for spotting this!
Also peer programmed with @rachelkang!

Before the revert (no rounded corners):
Screen Shot 2022-10-12 at 3 34 27 PM

After the revert (rounded corners):
Screen Shot 2022-10-13 at 10 43 38 AM

Fixes #10644

@ghost ghost added the community ✨ Community Contribution label Oct 13, 2022
@ghost
Copy link

ghost commented Oct 13, 2022

Hey there @tj-devel709! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.


if (radius >= 0)
platformButton.Resources.SetValueForAllKey(CornerRadiusResourceKeys, WinUIHelpers.CreateCornerRadius(radius));
platformButton.Resources.SetValueForAllKey(CornerRadiusResourceKeys, WinUIHelpers.CreateCornerRadius(buttonStroke.CornerRadius));
Copy link
Member

Choose a reason for hiding this comment

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

Should we use the radius field instead of getting the value again?

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed!

@rachelkang
Copy link
Member

Fixes #10644

@mattleibow
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@samhouts samhouts removed the community ✨ Community Contribution label Oct 13, 2022
@tj-devel709
Copy link
Member Author

I added a small test to make sure the radius of the WinUI does not get set back to zero.
Small photo added since I didn't realize the default button corner radius set is -1 which is rounded as well!
Screen Shot 2022-10-13 at 9 34 06 PM

@mattleibow
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@mattleibow
Copy link
Member

The value of -1 means default rounding. So whatever the OS decides.

@PureWeen PureWeen merged commit 08b3477 into dotnet:main Oct 17, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 17, 2023
@samhouts samhouts added the fixed-in-7.0.49 Look for this fix in 7.0.49 GA! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed-in-7.0.49 Look for this fix in 7.0.49 GA! platform/windows 🪟
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validate Windows buttons have round corners
6 participants