mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 00:53:56 +09:00
Update header breadcrumb tab control
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
@ -16,6 +17,13 @@ namespace osu.Game.Overlays
|
|||||||
public OverlayHeaderBreadcrumbControl()
|
public OverlayHeaderBreadcrumbControl()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
|
Height = 47;
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OverlayColourProvider colourProvider)
|
||||||
|
{
|
||||||
|
AccentColour = colourProvider.Light2;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override TabItem<string> CreateTabItem(string value) => new ControlTabItem(value);
|
protected override TabItem<string> CreateTabItem(string value) => new ControlTabItem(value);
|
||||||
@ -27,10 +35,18 @@ namespace osu.Game.Overlays
|
|||||||
public ControlTabItem(string value)
|
public ControlTabItem(string value)
|
||||||
: base(value)
|
: base(value)
|
||||||
{
|
{
|
||||||
|
RelativeSizeAxes = Axes.Y;
|
||||||
Text.Font = Text.Font.With(size: 14);
|
Text.Font = Text.Font.With(size: 14);
|
||||||
Chevron.Y = 3;
|
Text.Anchor = Anchor.CentreLeft;
|
||||||
|
Text.Origin = Anchor.CentreLeft;
|
||||||
|
Chevron.Y = 1;
|
||||||
Bar.Height = 0;
|
Bar.Height = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// base OsuTabItem makes font bold on activation, we don't want that here
|
||||||
|
protected override void OnActivated() => FadeHovered();
|
||||||
|
|
||||||
|
protected override void OnDeactivated() => FadeUnhovered();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user