mirror of
https://github.com/ppy/osu.git
synced 2025-03-12 11:17:22 +08:00
Remove width specifications
This commit is contained in:
parent
de8f502871
commit
663f34d3d8
@ -24,6 +24,7 @@ namespace osu.Game.Overlays.Chat.Tabs
|
|||||||
Icon.Alpha = 0;
|
Icon.Alpha = 0;
|
||||||
|
|
||||||
Text.Font = Text.Font.With(size: 45);
|
Text.Font = Text.Font.With(size: 45);
|
||||||
|
Text.Truncate = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
@ -87,12 +87,16 @@ namespace osu.Game.Overlays.Chat.Tabs
|
|||||||
},
|
},
|
||||||
Text = new OsuSpriteText
|
Text = new OsuSpriteText
|
||||||
{
|
{
|
||||||
Margin = new MarginPadding(5),
|
|
||||||
Origin = Anchor.CentreLeft,
|
Origin = Anchor.CentreLeft,
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
Text = value.ToString(),
|
Text = value.ToString(),
|
||||||
Font = OsuFont.GetFont(size: 18),
|
Font = OsuFont.GetFont(size: 18),
|
||||||
Width = 115f,
|
Padding = new MarginPadding(5)
|
||||||
|
{
|
||||||
|
Left = LeftTextPadding,
|
||||||
|
Right = RightTextPadding,
|
||||||
|
},
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
Truncate = true,
|
Truncate = true,
|
||||||
},
|
},
|
||||||
CloseButton = new TabCloseButton
|
CloseButton = new TabCloseButton
|
||||||
@ -111,6 +115,10 @@ namespace osu.Game.Overlays.Chat.Tabs
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected virtual float LeftTextPadding => 5;
|
||||||
|
|
||||||
|
protected virtual float RightTextPadding => IsRemovable ? 40 : 5;
|
||||||
|
|
||||||
protected virtual IconUsage DisplayIcon => FontAwesome.Solid.Hashtag;
|
protected virtual IconUsage DisplayIcon => FontAwesome.Solid.Hashtag;
|
||||||
|
|
||||||
protected virtual bool ShowCloseOnHover => true;
|
protected virtual bool ShowCloseOnHover => true;
|
||||||
|
@ -62,12 +62,10 @@ namespace osu.Game.Overlays.Chat.Tabs
|
|||||||
});
|
});
|
||||||
|
|
||||||
avatar.OnLoadComplete += d => d.FadeInFromZero(300, Easing.OutQuint);
|
avatar.OnLoadComplete += d => d.FadeInFromZero(300, Easing.OutQuint);
|
||||||
|
|
||||||
Text.X = ChatOverlay.TAB_AREA_HEIGHT;
|
|
||||||
|
|
||||||
Text.Width = 100f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override float LeftTextPadding => base.LeftTextPadding + ChatOverlay.TAB_AREA_HEIGHT;
|
||||||
|
|
||||||
protected override bool ShowCloseOnHover => false;
|
protected override bool ShowCloseOnHover => false;
|
||||||
|
|
||||||
protected override void FadeActive()
|
protected override void FadeActive()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user