1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-13 16:13:34 +08:00

Move toolbar button padding to a const

This commit is contained in:
Susko3 2024-01-14 21:13:00 +01:00
parent 724b4c9507
commit 47b385c552
3 changed files with 5 additions and 3 deletions

View File

@ -26,6 +26,8 @@ namespace osu.Game.Overlays.Toolbar
{
public abstract partial class ToolbarButton : OsuClickableContainer, IKeyBindingHandler<GlobalAction>
{
public const float PADDING = 3;
protected GlobalAction? Hotkey { get; set; }
public void SetIcon(Drawable icon)
@ -90,7 +92,7 @@ namespace osu.Game.Overlays.Toolbar
{
Width = Toolbar.HEIGHT,
RelativeSizeAxes = Axes.Y,
Padding = new MarginPadding(3),
Padding = new MarginPadding(PADDING),
Children = new Drawable[]
{
BackgroundContent = new Container

View File

@ -48,7 +48,7 @@ namespace osu.Game.Overlays.Toolbar
{
RelativeSizeAxes = Axes.Y,
AutoSizeAxes = Axes.X,
Padding = new MarginPadding(3),
Padding = new MarginPadding(ToolbarButton.PADDING),
Children = new Drawable[]
{
new Container

View File

@ -48,7 +48,7 @@ namespace osu.Game.Overlays.Toolbar
public RulesetButton()
{
ButtonContent.Padding = new MarginPadding(3)
ButtonContent.Padding = new MarginPadding(PADDING)
{
Bottom = 5
};