From 9833dd955f8c09ff8455ab499257ac044362414c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Vaj=C4=8F=C3=A1k?= Date: Sun, 14 Apr 2024 01:30:59 +0200 Subject: [PATCH 1/2] Fix toolbar volume bar masking --- osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs b/osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs index 5da0056787..718789e3c7 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs @@ -21,7 +21,7 @@ namespace osu.Game.Overlays.Toolbar { public partial class ToolbarMusicButton : ToolbarOverlayToggleButton { - private Circle volumeBar; + private Box volumeBar; protected override Anchor TooltipAnchor => Anchor.TopRight; @@ -45,14 +45,15 @@ namespace osu.Game.Overlays.Toolbar Height = IconContainer.Height, Margin = new MarginPadding { Horizontal = 2.5f }, Masking = true, - Children = new[] + CornerRadius = 3f, + Children = new Drawable[] { new Circle { RelativeSizeAxes = Axes.Both, Colour = Color4.White.Opacity(0.25f), }, - volumeBar = new Circle + volumeBar = new Box { RelativeSizeAxes = Axes.Both, Height = 0f, From ed6680a61d535849beb78bd26738e55172e2aabc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Vaj=C4=8F=C3=A1k?= Date: Sun, 14 Apr 2024 15:10:05 +0200 Subject: [PATCH 2/2] Fixed type inconsistency and rounding --- osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs b/osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs index 718789e3c7..51b95b7d32 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarMusicButton.cs @@ -37,7 +37,7 @@ namespace osu.Game.Overlays.Toolbar StateContainer = music; Flow.Padding = new MarginPadding { Horizontal = Toolbar.HEIGHT / 4 }; - Flow.Add(volumeDisplay = new Container + Flow.Add(volumeDisplay = new CircularContainer { Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, @@ -45,10 +45,9 @@ namespace osu.Game.Overlays.Toolbar Height = IconContainer.Height, Margin = new MarginPadding { Horizontal = 2.5f }, Masking = true, - CornerRadius = 3f, - Children = new Drawable[] + Children = new[] { - new Circle + new Box { RelativeSizeAxes = Axes.Both, Colour = Color4.White.Opacity(0.25f),