From d4a863d00abb036c4c694d255ae016cd2b37afef Mon Sep 17 00:00:00 2001 From: Salman Alshamrani Date: Mon, 30 Jun 2025 11:10:43 +0300 Subject: [PATCH] Use `MaximumSize` to limit picker background width Co-authored-by: Joseph Madamba --- osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs b/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs index 9cc9ca87de..f2630caa83 100644 --- a/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs +++ b/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs @@ -71,8 +71,7 @@ namespace osu.Game.Overlays.BeatmapSet { new Container { - RelativeSizeAxes = Axes.X, - AutoSizeAxes = Axes.Y, + AutoSizeAxes = Axes.Both, Margin = new MarginPadding { Left = -(tile_icon_padding + tile_spacing / 2), Bottom = 10 }, Children = new Drawable[] { @@ -89,8 +88,7 @@ namespace osu.Game.Overlays.BeatmapSet }, Difficulties = new DifficultiesContainer { - RelativeSizeAxes = Axes.X, - AutoSizeAxes = Axes.Y, + AutoSizeAxes = Axes.Both, OnLostHover = () => showBeatmap(Beatmap.Value, withStarRating: false), }, } @@ -144,6 +142,12 @@ namespace osu.Game.Overlays.BeatmapSet Beatmap.TriggerChange(); } + protected override void Update() + { + base.Update(); + Difficulties.MaximumSize = new Vector2(DrawWidth, float.MaxValue); + } + private void updateDisplay() { Difficulties.Clear();