1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-19 13:02:54 +08:00

Undo sizing changes

This commit is contained in:
ansel 2023-01-12 19:48:11 +03:00
parent b38cf8c56c
commit 0bd1c46c74
2 changed files with 22 additions and 14 deletions

View File

@ -3,8 +3,6 @@
using System;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Graphics.UserInterfaceV2;
using osu.Game.Resources.Localisation.Web;
namespace osu.Game.Overlays.Comments
@ -16,14 +14,10 @@ namespace osu.Game.Overlays.Comments
[BackgroundDependencyLoader]
private void load()
{
ButtonsContainer.Add(new RoundedButton
ButtonsContainer.Add(new EditorButton
{
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
Action = () => OnCancel?.Invoke(),
Text = CommonStrings.ButtonsCancel,
Width = 100,
Height = 30,
});
}
}

View File

@ -85,7 +85,7 @@ namespace osu.Game.Overlays.Comments
{
Name = @"Footer",
RelativeSizeAxes = Axes.X,
Height = 40,
Height = 35,
Padding = new MarginPadding { Horizontal = side_padding },
Children = new Drawable[]
{
@ -93,7 +93,7 @@ namespace osu.Game.Overlays.Comments
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Font = OsuFont.GetFont(size: 14, weight: FontWeight.SemiBold),
Font = OsuFont.GetFont(size: 12, weight: FontWeight.SemiBold),
Text = FooterText
},
new FillFlowContainer
@ -113,13 +113,9 @@ namespace osu.Game.Overlays.Comments
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Horizontal,
Spacing = new Vector2(5, 0),
Child = commitButton = new RoundedButton
Child = commitButton = new EditorButton
{
Width = 100,
Height = 30,
Text = CommitButtonText,
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
Action = () => OnCommit(Current.Value)
}
},
@ -184,5 +180,23 @@ namespace osu.Game.Overlays.Comments
Child = new OsuSpriteText { Text = c.ToString(), Font = OsuFont.GetFont(size: CalculatedTextSize) }
};
}
protected partial class EditorButton : RoundedButton
{
public EditorButton()
{
Width = 80;
Height = 25;
Anchor = Anchor.CentreRight;
Origin = Anchor.CentreRight;
}
protected override SpriteText CreateText()
{
var t = base.CreateText();
t.Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 12);
return t;
}
}
}
}