Reduce complexity of icon container nesting

This commit is contained in:
Dean Herbert 2022-05-03 14:48:00 +09:00
parent b5ea26f2fa
commit 983eed32fc
1 changed files with 7 additions and 18 deletions

View File

@ -66,31 +66,20 @@ public ShearedSearchTextBox()
RelativeSizeAxes = Axes.Both,
Size = Vector2.One
},
new Container
new SpriteIcon
{
Name = @"Icon container",
RelativeSizeAxes = Axes.Y,
Width = 50,
Origin = Anchor.CentreRight,
Anchor = Anchor.CentreRight,
Children = new Drawable[]
{
new SpriteIcon
{
Icon = FontAwesome.Solid.Search,
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
Size = new Vector2(16),
Shear = -Shear
}
}
Icon = FontAwesome.Solid.Search,
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
Size = new Vector2(16),
Shear = -Shear
}
}
},
ColumnDimensions = new[]
{
new Dimension(),
new Dimension(GridSizeMode.AutoSize)
new Dimension(GridSizeMode.Absolute, 50),
}
}
};