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 @@ protected ToolbarButton()
{
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 @@ private void load(OsuConfigManager config)
{
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 @@ private partial class RulesetButton : ToolbarButton
public RulesetButton()
{
ButtonContent.Padding = new MarginPadding(3)
ButtonContent.Padding = new MarginPadding(PADDING)
{
Bottom = 5
};