robinmanuelthiel / flexbutton

Flexible button control for Xamarin.Forms
MIT License
240 stars 34 forks source link

Respect HorizontalOptions when using icon and text #60

Closed esskar closed 5 years ago

esskar commented 6 years ago

Describe the bug Choosing HorizontalOptions="Start" aligns text-only buttons to the left, when adding an icon, everything is centered aligned again.

To Reproduce

Expected behavior I would expect that icon and text are left aligned.

mc-evgeny-zborovsky commented 6 years ago

I have the same issue, however in my case I don't have an icon but just plain text. On iOS the text is aligned to the center even without setting the HorizontalOptions property. On Android the text is aligned to left, setting the HorizontalOptions is not working either.

<flexButton:FlexButton Grid.Row="1" CornerRadius="33" WidthRequest="300" HeightRequest="60" BackgroundColor="{StaticResource darkGreyBlue}" HorizontalOptions="CenterAndExpand" Text="Get started" FontFamily="{StaticResource MediumFont}" ClickedCommand="{Binding GetStartedCommand}"/>

flex_txt

Using the latest and greatest XF and lib version.

robinmanuelthiel commented 5 years ago

Turns out, that it does respect the HorizontalOptions, when a HeightRequest is set. Strange, I will look into this!

robinmanuelthiel commented 5 years ago

Fixed in version 0.9.0: https://www.nuget.org/packages/Forms.Controls.FlexButton/0.9.0