Skip to content

Commit

Permalink
Automated dotnet-format update (xamarin#15091)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] authored Jan 27, 2022
1 parent 9222f32 commit 130d8f5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace Xamarin.Forms.Controls.Issues
{
[Issue(IssueTracker.Github, 15066, "StackLayout's layout inside ScrollView is not updated properly when adding children",
[Issue(IssueTracker.Github, 15066, "StackLayout's layout inside ScrollView is not updated properly when adding children",
PlatformAffected.Android)]
public class Issue15066 : TestContentPage
{
protected override void Init()
{
var instructions = new Label
{
var instructions = new Label
{
BackgroundColor = Color.AntiqueWhite,
Padding = 3,
Text = "Tap the 'Add' button until the added items are past the bottom of the screen." +
Expand All @@ -22,7 +22,8 @@ protected override void Init()

var button = new Button() { Text = "Add" };

button.Clicked += (sender, args) => {
button.Clicked += (sender, args) =>
{
layout.Children.Add(new StackLayout() { BackgroundColor = Color.Gray, HeightRequest = 40.0 });
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,24 @@ public class Issue8606 : TestContentPage
protected override void Init()
{
var iconColor = Color.White;
List<(string fontFamily,string glyph,string familyShortName)> fontFamilyGlyphs = new List<(string,string,string)>
List<(string fontFamily, string glyph, string familyShortName)> fontFamilyGlyphs = new List<(string, string, string)>
{
(GetFontFamily("fa-solid-900.ttf","Font Awesome 5 Free"), GetGlyph("f059"),"FaSolid"),
(GetFontFamily("ionicons.ttf","Ionicons"), GetGlyph("f142"),"Ionicons"),
(GetFontFamily("materialdesignicons-webfont.ttf","Material Design Icons"),GetGlyph("f625"),"Material old"),
(GetFontFamily("MaterialIconsOutlined-Regular.otf","Material Icons Outlined"), GetGlyph("e8fd"),"Material"),
};

List<Func<FontImageSource, View>> affectedViewsCreators = new List<Func<FontImageSource, View>>
{
(fontImageSource) => new Button { ImageSource = fontImageSource },
(fontImageSource) => new ImageButton { WidthRequest=39,HeightRequest=39, Source = fontImageSource, BackgroundColor = Color.FromHex("#333333")},
(fontImageSource) => new Frame{Content = new Image { Source = fontImageSource}, BorderColor=iconColor, Padding=0, }
};

var content = new StackLayout { };
content.Children.Add(new Label { BackgroundColor = Color.Black, Padding = 12, TextColor = iconColor, Text = "Button, ImageButton and Image should use the same FontImageSourceHandler which should render centered." });

foreach (var (fontFamily, glyph, familyShortName) in fontFamilyGlyphs)
{
var fontImageSource = new FontImageSource { Size = 24, Color = iconColor, FontFamily = fontFamily, Glyph = glyph };
Expand All @@ -56,7 +56,7 @@ protected override void Init()
}

Content = content;

}

private string GetFontFamily(string fileName, string fontName)
Expand Down

0 comments on commit 130d8f5

Please sign in to comment.