mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Adjust toolbar button sizing
This commit is contained in:
@ -9,6 +9,7 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Effects;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Framework.Input.Bindings;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Graphics;
|
||||
@ -25,8 +26,6 @@ namespace osu.Game.Overlays.Toolbar
|
||||
{
|
||||
public abstract class ToolbarButton : OsuClickableContainer, IKeyBindingHandler<GlobalAction>
|
||||
{
|
||||
public const float WIDTH = Toolbar.HEIGHT * 1.4f;
|
||||
|
||||
protected GlobalAction? Hotkey { get; set; }
|
||||
|
||||
public void SetIcon(Drawable icon)
|
||||
@ -80,7 +79,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
protected ToolbarButton()
|
||||
: base(HoverSampleSet.Loud)
|
||||
{
|
||||
Width = WIDTH;
|
||||
Width = Toolbar.HEIGHT;
|
||||
RelativeSizeAxes = Axes.Y;
|
||||
|
||||
Children = new Drawable[]
|
||||
@ -114,7 +113,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
Size = new Vector2(20),
|
||||
Size = new Vector2(26),
|
||||
Alpha = 0,
|
||||
},
|
||||
DrawableText = new OsuSpriteText
|
||||
|
@ -37,7 +37,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
},
|
||||
ModeButtonLine = new Container
|
||||
{
|
||||
Size = new Vector2(ToolbarButton.WIDTH, 3),
|
||||
Size = new Vector2(Toolbar.HEIGHT, 3),
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.TopLeft,
|
||||
Masking = true,
|
||||
|
@ -65,12 +65,6 @@ namespace osu.Game.Overlays.Toolbar
|
||||
Parent.Click();
|
||||
return base.OnClick(e);
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
IconContainer.Scale *= 1.4f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
{
|
||||
public ToolbarSettingsButton()
|
||||
{
|
||||
Width *= 1.4f;
|
||||
Hotkey = GlobalAction.ToggleSettings;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user