maui icon indicating copy to clipboard operation
maui copied to clipboard

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

Open mattleibow opened this issue 1 year ago • 6 comments

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 avatar May 20 '24 11:05 mattleibow

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.

github-actions[bot] avatar May 20 '24 11:05 github-actions[bot]

Observed when adding UI tests to https://github.com/dotnet/maui/pull/22298

mattleibow avatar May 20 '24 11:05 mattleibow

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.

espenrl avatar May 24 '24 11:05 espenrl

@espenrl the padding fix was just merged https://github.com/dotnet/maui/issues/22364

mattleibow avatar May 24 '24 13:05 mattleibow

@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 avatar May 24 '24 14:05 espenrl

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

espenrl avatar May 24 '24 19:05 espenrl