xamarin/Xamarin.Forms

[Bug] Icon not correctly centered with text when using FontImageSource

オープン

#6,632 opened on 2019/06/23

 (2 件のコメント) (1 件のリアクション) (0 人の担当者)C# (1,926 件のフォーク)batch import
e/5 :clock5:help wantedp/Androidt/bug :bug:up-for-grabs

Repository metrics

Stars
 (5,644 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

Description

In a button, icon is not correctly centered with the text.

Steps to Reproduce

  1. Add a button to a page with a text and an icon using FontImageSource
  2. Set ContentLayout property of the button to "Left,0"
  3. Launch the app an go to the page

Expected Behavior

Icon and text are centered in the button, the icon appears just on the left of the text without space between them.

Actual Behavior

Text is centered in the button but the icon is not, there is a lot of space between text and button. It seems that ContentLayout property is not taken into account.

Basic Information

  • Version with issue: Xamarin Forms 4.1
  • IDE: VS 2019
  • Platform Target Frameworks: Only tested on Android
    • Android: 9.0
  • Nuget Packages: Nuget from the default Shell templates
  • Affected Devices: All devices

Screenshots

FontImageSource_Issue

The button "SomeText" on the screenshot shows the icon not correctly centered.

Reproduction Link

Github repo : https://github.com/TechWatching/FontImageSourceIssue

コントリビューターガイド