mirror of https://github.com/ppy/osu
Fix sizings
This commit is contained in:
parent
4764a771d0
commit
d01ec59acb
|
@ -213,18 +213,18 @@ private void load(OsuColour colours)
|
|||
|
||||
if (SetInfo.OnlineInfo?.HasVideo ?? false)
|
||||
{
|
||||
statusContainer.Add(new IconPill(FontAwesome.fa_film));
|
||||
statusContainer.Add(new IconPill(FontAwesome.fa_film) { IconSize = new Vector2(20) });
|
||||
}
|
||||
|
||||
if (SetInfo.OnlineInfo?.HasStoryboard ?? false)
|
||||
{
|
||||
statusContainer.Add(new IconPill(FontAwesome.fa_image));
|
||||
statusContainer.Add(new IconPill(FontAwesome.fa_image) { IconSize = new Vector2(20) });
|
||||
}
|
||||
|
||||
statusContainer.Add(new BeatmapSetOnlineStatusPill
|
||||
{
|
||||
TextSize = 12,
|
||||
TextPadding = new MarginPadding { Horizontal = 10, Vertical = 5 },
|
||||
TextPadding = new MarginPadding { Horizontal = 10, Vertical = 4 },
|
||||
Status = SetInfo.OnlineInfo?.Status ?? BeatmapSetOnlineStatus.None,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -12,6 +12,14 @@ namespace osu.Game.Overlays.Direct
|
|||
{
|
||||
public class IconPill : CircularContainer
|
||||
{
|
||||
public Vector2 IconSize
|
||||
{
|
||||
get => iconContainer.Size;
|
||||
set => iconContainer.Size = value;
|
||||
}
|
||||
|
||||
private readonly Container iconContainer;
|
||||
|
||||
public IconPill(FontAwesome icon)
|
||||
{
|
||||
AutoSizeAxes = Axes.Both;
|
||||
|
@ -25,16 +33,16 @@ public IconPill(FontAwesome icon)
|
|||
Colour = Color4.Black,
|
||||
Alpha = 0.5f,
|
||||
},
|
||||
new Container
|
||||
iconContainer = new Container
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Margin = new MarginPadding(5),
|
||||
Size = new Vector2(22),
|
||||
Padding = new MarginPadding(5),
|
||||
Child = new SpriteIcon
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Icon = icon,
|
||||
Size = new Vector2(12),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue