1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 18:23:04 +08:00

Merge pull request #27853 from Drison64/mask-volume-bar

Fix toolbar volume bar masking
This commit is contained in:
Dan Balasescu 2024-04-15 03:36:31 +09:00 committed by GitHub
commit d34834af05
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,7 +21,7 @@ namespace osu.Game.Overlays.Toolbar
{ {
public partial class ToolbarMusicButton : ToolbarOverlayToggleButton public partial class ToolbarMusicButton : ToolbarOverlayToggleButton
{ {
private Circle volumeBar; private Box volumeBar;
protected override Anchor TooltipAnchor => Anchor.TopRight; protected override Anchor TooltipAnchor => Anchor.TopRight;
@ -37,7 +37,7 @@ namespace osu.Game.Overlays.Toolbar
StateContainer = music; StateContainer = music;
Flow.Padding = new MarginPadding { Horizontal = Toolbar.HEIGHT / 4 }; Flow.Padding = new MarginPadding { Horizontal = Toolbar.HEIGHT / 4 };
Flow.Add(volumeDisplay = new Container Flow.Add(volumeDisplay = new CircularContainer
{ {
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,
@ -47,12 +47,12 @@ namespace osu.Game.Overlays.Toolbar
Masking = true, Masking = true,
Children = new[] Children = new[]
{ {
new Circle new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = Color4.White.Opacity(0.25f), Colour = Color4.White.Opacity(0.25f),
}, },
volumeBar = new Circle volumeBar = new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Height = 0f, Height = 0f,