1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:27:29 +08:00

Fix chat overlay being far too large

This commit is contained in:
Dean Herbert 2024-05-03 12:31:19 +08:00
parent 2d0240437a
commit 3249ecee27
No known key found for this signature in database
4 changed files with 10 additions and 8 deletions

View File

@ -49,7 +49,7 @@ namespace osu.Game.Overlays.Chat.ChannelList
[BackgroundDependencyLoader]
private void load()
{
Height = 30;
Height = 25;
RelativeSizeAxes = Axes.X;
Children = new Drawable[]
@ -87,7 +87,7 @@ namespace osu.Game.Overlays.Chat.ChannelList
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Text = Channel.Name,
Font = OsuFont.Torus.With(size: 17, weight: FontWeight.SemiBold),
Font = OsuFont.Torus.With(size: 14, weight: FontWeight.SemiBold),
Colour = colourProvider.Light3,
Margin = new MarginPadding { Bottom = 2 },
RelativeSizeAxes = Axes.X,

View File

@ -47,7 +47,7 @@ namespace osu.Game.Overlays.Chat
public IReadOnlyCollection<Drawable> DrawableContentFlow => drawableContentFlow;
protected virtual float FontSize => 20;
protected virtual float FontSize => 14;
protected virtual float Spacing => 15;

View File

@ -19,6 +19,8 @@ namespace osu.Game.Overlays.Chat
{
public partial class ChatTextBar : Container
{
public const float HEIGHT = 40;
public readonly BindableBool ShowSearch = new BindableBool();
public event Action<string>? OnChatMessageCommitted;
@ -45,7 +47,7 @@ namespace osu.Game.Overlays.Chat
private void load(OverlayColourProvider colourProvider)
{
RelativeSizeAxes = Axes.X;
Height = 60;
Height = HEIGHT;
Children = new Drawable[]
{
@ -76,7 +78,7 @@ namespace osu.Game.Overlays.Chat
Child = chattingText = new TruncatingSpriteText
{
MaxWidth = chatting_text_width - padding * 2,
Font = OsuFont.Torus.With(size: 20),
Font = OsuFont.Torus,
Colour = colourProvider.Background1,
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
@ -91,7 +93,7 @@ namespace osu.Game.Overlays.Chat
Icon = FontAwesome.Solid.Search,
Origin = Anchor.CentreRight,
Anchor = Anchor.CentreRight,
Size = new Vector2(20),
Size = new Vector2(OsuFont.DEFAULT_FONT_SIZE),
Margin = new MarginPadding { Right = 2 },
},
},
@ -101,6 +103,7 @@ namespace osu.Game.Overlays.Chat
Padding = new MarginPadding { Right = padding },
Child = chatTextBox = new ChatTextBox
{
FontSize = OsuFont.DEFAULT_FONT_SIZE,
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
RelativeSizeAxes = Axes.X,

View File

@ -55,7 +55,6 @@ namespace osu.Game.Overlays
private const int transition_length = 500;
private const float top_bar_height = 40;
private const float side_bar_width = 190;
private const float chat_bar_height = 60;
protected override string PopInSampleName => @"UI/overlay-big-pop-in";
protected override string PopOutSampleName => @"UI/overlay-big-pop-out";
@ -136,7 +135,7 @@ namespace osu.Game.Overlays
Padding = new MarginPadding
{
Left = side_bar_width,
Bottom = chat_bar_height,
Bottom = ChatTextBar.HEIGHT,
},
Children = new Drawable[]
{