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

ImageButton border (BorderWidth) overlaps the image instead of adding space #22520

Closed
mattleibow opened this issue May 20, 2024 · 6 comments · Fixed by #21259
Closed

ImageButton border (BorderWidth) overlaps the image instead of adding space #22520

mattleibow opened this issue May 20, 2024 · 6 comments · Fixed by #21259
Labels
Milestone

Comments

@mattleibow
Copy link
Member

Description

With null/no background:

Android iOS Windows
ImageButtonUITests_BorderWidth ImageButtonUITests_BorderWidth ImageButtonUITests_BorderWidth

With background:

Android iOS Windows
ImageButtonUITests_BorderWidth_WithBackground ImageButtonUITests_BorderWidth_WithBackground ImageButtonUITests_BorderWidth_WithBackground

Steps to Reproduce

Run the ImageButtonUITests or "Image Button Gallery" page.

Link to public reproduction project repository

No response

Version with bug

8.0.40 SR5

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, macOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@mattleibow mattleibow added the t/bug Something isn't working label May 20, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@dotnet-policy-service dotnet-policy-service bot added the s/triaged Issue has been reviewed label May 20, 2024
@mattleibow mattleibow changed the title ImageButton border overlaps the image instead of adding space ImageButton border (BorderWidth) overlaps the image instead of adding space May 20, 2024
@mattleibow
Copy link
Member Author

Observed when adding UI tests to #22298

@espenrl
Copy link
Contributor

espenrl commented May 24, 2024

This one could be relevant. It's plain Android UI code, not MAUI, but I get the same problem in MAUI.

https://stackoverflow.com/questions/62341037/shapeableimageview-with-strokewidth-stroke-trimmed-on-all-four-side

It is very obvious that half the border stroke is clipped when using CornerRadius such that the border becomes circular. It can be combatted using Padding. But something has changed in MAUI and ImageButton.Padding doesn't do anything. Seems like its not applied anymore.

@mattleibow
Copy link
Member Author

@espenrl the padding fix was just merged #22364

@espenrl
Copy link
Contributor

espenrl commented May 24, 2024

@espenrl the padding fix was just merged #22364

That's super @mattleibow Perhaps ImageButton could have been coded such that it dealt with the issue of clipping half of the borders?

@espenrl
Copy link
Contributor

espenrl commented May 24, 2024

Found this PR which is about the issue I mentioned #21259

@mattleibow mattleibow added this to the Backlog milestone May 30, 2024
@samhouts samhouts removed the s/triaged Issue has been reviewed label Jul 3, 2024
@samhouts samhouts added the s/triaged Issue has been reviewed label Jul 10, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants