From db1c59475b0e31fd17d6944804c23a65b206c756 Mon Sep 17 00:00:00 2001 From: Joseph Madamba Date: Fri, 9 Feb 2024 15:10:45 -0800 Subject: [PATCH 1/4] Wrap beatmap listing filters and match web spacing --- .../BeatmapListingSearchControl.cs | 1 + .../BeatmapListing/BeatmapSearchFilterRow.cs | 37 ++++--------------- ...BeatmapSearchMultipleSelectionFilterRow.cs | 4 +- .../Overlays/BeatmapListing/FilterTabItem.cs | 2 - 4 files changed, 9 insertions(+), 35 deletions(-) diff --git a/osu.Game/Overlays/BeatmapListing/BeatmapListingSearchControl.cs b/osu.Game/Overlays/BeatmapListing/BeatmapListingSearchControl.cs index 3fa0fc7a7732..bab64165cbec 100644 --- a/osu.Game/Overlays/BeatmapListing/BeatmapListingSearchControl.cs +++ b/osu.Game/Overlays/BeatmapListing/BeatmapListingSearchControl.cs @@ -128,6 +128,7 @@ public BeatmapListingSearchControl() RelativeSizeAxes = Axes.X, Direction = FillDirection.Vertical, Padding = new MarginPadding { Horizontal = 10 }, + Spacing = new Vector2(5), Children = new Drawable[] { generalFilter = new BeatmapSearchGeneralFilterRow(), diff --git a/osu.Game/Overlays/BeatmapListing/BeatmapSearchFilterRow.cs b/osu.Game/Overlays/BeatmapListing/BeatmapSearchFilterRow.cs index 6d75521cb07d..f79695a123fd 100644 --- a/osu.Game/Overlays/BeatmapListing/BeatmapSearchFilterRow.cs +++ b/osu.Game/Overlays/BeatmapListing/BeatmapSearchFilterRow.cs @@ -1,14 +1,12 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.UserInterface; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; -using osu.Game.Graphics.UserInterface; using osuTK; using osu.Framework.Extensions.EnumExtensions; using osu.Framework.Localisation; @@ -49,8 +47,6 @@ public BeatmapSearchFilterRow(LocalisableString header) { new OsuSpriteText { - Anchor = Anchor.BottomLeft, - Origin = Anchor.BottomLeft, Font = OsuFont.GetFont(size: 13), Text = header }, @@ -69,10 +65,8 @@ protected partial class BeatmapSearchFilter : TabControl { public BeatmapSearchFilter() { - Anchor = Anchor.BottomLeft; - Origin = Anchor.BottomLeft; RelativeSizeAxes = Axes.X; - Height = 15; + AutoSizeAxes = Axes.Y; TabContainer.Spacing = new Vector2(10, 0); @@ -83,33 +77,16 @@ public BeatmapSearchFilter() } } - [BackgroundDependencyLoader] - private void load(OverlayColourProvider colourProvider) - { - if (Dropdown is FilterDropdown fd) - fd.AccentColour = colourProvider.Light2; - } - - protected override Dropdown CreateDropdown() => new FilterDropdown(); + protected override Dropdown CreateDropdown() => null!; protected override TabItem CreateTabItem(T value) => new FilterTabItem(value); - private partial class FilterDropdown : OsuTabDropdown + protected override TabFillFlowContainer CreateTabFlow() => new TabFillFlowContainer { - protected override DropdownHeader CreateHeader() => new FilterHeader - { - Anchor = Anchor.TopRight, - Origin = Anchor.TopRight - }; - - private partial class FilterHeader : OsuTabDropdownHeader - { - public FilterHeader() - { - Background.Height = 1; - } - } - } + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, + AllowMultiline = true, + }; } } } diff --git a/osu.Game/Overlays/BeatmapListing/BeatmapSearchMultipleSelectionFilterRow.cs b/osu.Game/Overlays/BeatmapListing/BeatmapSearchMultipleSelectionFilterRow.cs index abd2643a4198..e59beb43ff37 100644 --- a/osu.Game/Overlays/BeatmapListing/BeatmapSearchMultipleSelectionFilterRow.cs +++ b/osu.Game/Overlays/BeatmapListing/BeatmapSearchMultipleSelectionFilterRow.cs @@ -52,10 +52,8 @@ protected partial class MultipleSelectionFilter : FillFlowContainer Date: Sun, 10 Mar 2024 22:45:29 +0300 Subject: [PATCH 2/4] Fic incorrect ExtendableCircle gradient --- .../Components/Timeline/TimelineHitObjectBlueprint.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/osu.Game/Screens/Edit/Compose/Components/Timeline/TimelineHitObjectBlueprint.cs b/osu.Game/Screens/Edit/Compose/Components/Timeline/TimelineHitObjectBlueprint.cs index d4afcc015105..7e6e886ff73c 100644 --- a/osu.Game/Screens/Edit/Compose/Components/Timeline/TimelineHitObjectBlueprint.cs +++ b/osu.Game/Screens/Edit/Compose/Components/Timeline/TimelineHitObjectBlueprint.cs @@ -471,6 +471,12 @@ private void load(OsuColour colours) /// public partial class ExtendableCircle : CompositeDrawable { + public new ColourInfo Colour + { + get => Content.Colour; + set => Content.Colour = value; + } + protected readonly Circle Content; public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => Content.ReceivePositionalInputAt(screenSpacePos); From e5e7c8f26841654a6819f3c88c40a347184c086b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Mon, 11 Mar 2024 14:58:28 +0100 Subject: [PATCH 3/4] Wrap beatmap listing filter names too While we're here fixing... Addresses https://github.com/ppy/osu/discussions/15452#discussioncomment-2734237. --- osu.Game/Overlays/BeatmapListing/BeatmapSearchFilterRow.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/osu.Game/Overlays/BeatmapListing/BeatmapSearchFilterRow.cs b/osu.Game/Overlays/BeatmapListing/BeatmapSearchFilterRow.cs index f79695a123fd..0b54a921f5b7 100644 --- a/osu.Game/Overlays/BeatmapListing/BeatmapSearchFilterRow.cs +++ b/osu.Game/Overlays/BeatmapListing/BeatmapSearchFilterRow.cs @@ -6,10 +6,10 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.UserInterface; using osu.Game.Graphics; -using osu.Game.Graphics.Sprites; using osuTK; using osu.Framework.Extensions.EnumExtensions; using osu.Framework.Localisation; +using osu.Game.Graphics.Containers; namespace osu.Game.Overlays.BeatmapListing { @@ -45,9 +45,10 @@ public BeatmapSearchFilterRow(LocalisableString header) { new[] { - new OsuSpriteText + new OsuTextFlowContainer(t => t.Font = OsuFont.GetFont(size: 13)) { - Font = OsuFont.GetFont(size: 13), + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, Text = header }, filter = CreateFilter() From f30dfcb728b216659bf80ff513f7c0cdb97d56f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Mon, 11 Mar 2024 21:34:10 +0100 Subject: [PATCH 4/4] Fix ruleset medals not displaying due to deserialisation failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤦🤦🤦🤦🤦🤦🤦🤦🤦🤦🤦🤦🤦🤦🤦🤦🤦🤦 Reported in https://discord.com/channels/188630481301012481/188630652340404224/1216812697589518386. --- .../Notifications/WebSocket/Events/UserAchievementUnlock.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Online/Notifications/WebSocket/Events/UserAchievementUnlock.cs b/osu.Game/Online/Notifications/WebSocket/Events/UserAchievementUnlock.cs index 6c7c8af4f4cf..3f803a4fe594 100644 --- a/osu.Game/Online/Notifications/WebSocket/Events/UserAchievementUnlock.cs +++ b/osu.Game/Online/Notifications/WebSocket/Events/UserAchievementUnlock.cs @@ -14,7 +14,7 @@ public class UserAchievementUnlock public uint AchievementId { get; set; } [JsonProperty("achievement_mode")] - public ushort? AchievementMode { get; set; } + public string? AchievementMode { get; set; } [JsonProperty("cover_url")] public string CoverUrl { get; set; } = string.Empty;