-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
ImageButton border (BorderWidth) overlaps the image instead of adding space - fix #21259
base: main
Are you sure you want to change the base?
Conversation
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run MAUI-UITests-public |
Azure Pipelines successfully started running 1 pipeline(s). |
Thank you Kuba! I used your fix in my handler and it works perfectly! |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
@@ -40,6 +40,9 @@ public static void UpdateCornerRadius(this ShapeableImageView platformButton, IB | |||
.SetBottomLeftCorner(CornerFamily.Rounded, radius) | |||
.SetBottomRightCorner(CornerFamily.Rounded, radius) | |||
.Build(); | |||
|
|||
int contentPadding = (int)(radius / 2); | |||
platformButton.SetContentPadding(contentPadding, contentPadding, contentPadding, contentPadding); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm I'm not sure what is wrong here and if it is a good thing or not
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
@mattleibow I've merged the main branch. I've also added one commit because when I tested with the main branch the Android didn't work IMO. Please have a look:
After my commit this is how the Android looks like: But it might not be a correct fix, so please have a look at it 😊 |
This is nice that it fixes Android, I think iOS also has the same issue. How easy is it to fix ios and then we merge? If things are complicated, as buttons on iOS are, then we can do a separate PR. I know TJ has been working on normal buttons and that has been a pain - especially since we can't derive from UIButton. But no need to delay this fix for Android just because ios is being difficult. But, if there is basic padding math then it may be worth just doing it all in one go. |
@mattleibow Yeah, I've added a commit that fixes iOS |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Issues Fixed
Fixes #24856
Fixes #22520