roubachof / Sharpnado.Tabs

Pure MAUI and Xamarin.Forms Tabs, including fixed tabs, scrollable tabs, bottom tabs, badge, segmented control, custom tabs, button tabs, bendable tabs...
MIT License
479 stars 62 forks source link

MAUI - FontIcon for IconImageSource padding #102

Closed m1dst closed 4 months ago

m1dst commented 7 months ago

Platform (please complete the following information):

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 image

  <tabs:TabButton
      x:Name="TabButton"
      ButtonBackgroundColor="{StaticResource Primary}"
      ButtonCircleSize="60"
      ButtonPadding="20"
      IconImageSource="{FontImage {StaticResource fa-camera},
        FontFamily=FontAwesomeSolid,
        Color='White',
        Size=96 }"
       />

produces image

If I edit the ButtonPadding to zero and then back to 20 using the live editor then it works as expected.

image

m1dst commented 7 months ago

Perhaps it is related to this? https://github.com/dotnet/maui/issues/18857

FreakyAli commented 4 months ago

@m1dst Do you think it has something to do with the size you are setting to your icon in IconImageSource?

m1dst commented 4 months ago

I've since found this is a Maui bug. It has been fixed in the next release of Maui but isn't available today.