Sharpnado.Tabs
Sharpnado.Tabs copied to clipboard
MAUI - FontIcon for IconImageSource padding
Platform (please complete the following information):
- OS: Android
- Device: AndroidEmulator
- Sdk version: API30
- MAUI: [8.0.3]
Describe the bug I tried replacing a png with a fonticon and the scaling and padding was ignored.
<tabs:TabButton
x:Name="TabButton"
ButtonBackgroundColor="{StaticResource Primary}"
ButtonCircleSize="60"
ButtonPadding="20"
IconImageSource="camera_96.png"
/>
produces
<tabs:TabButton
x:Name="TabButton"
ButtonBackgroundColor="{StaticResource Primary}"
ButtonCircleSize="60"
ButtonPadding="20"
IconImageSource="{FontImage {StaticResource fa-camera},
FontFamily=FontAwesomeSolid,
Color='White',
Size=96 }"
/>
produces
If I edit the ButtonPadding to zero and then back to 20 using the live editor then it works as expected.
Perhaps it is related to this? https://github.com/dotnet/maui/issues/18857
@m1dst Do you think it has something to do with the size you are setting to your icon in IconImageSource?
I've since found this is a Maui bug. It has been fixed in the next release of Maui but isn't available today.