From 609c7227eee913dbb602b5eefdd628bb5c9c216d Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 25 May 2023 19:55:11 +0900 Subject: [PATCH] Fix changes to font weight in a couple of combined implementations --- .../Screens/OnlinePlay/Lounge/Components/OnlinePlayPill.cs | 4 +++- .../OnlinePlay/Lounge/Components/RoomSpecialCategoryPill.cs | 3 +++ .../Screens/OnlinePlay/Lounge/Components/RoomStatusPill.cs | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/OnlinePlay/Lounge/Components/OnlinePlayPill.cs b/osu.Game/Screens/OnlinePlay/Lounge/Components/OnlinePlayPill.cs index 983fab8525..3e6d7a2e54 100644 --- a/osu.Game/Screens/OnlinePlay/Lounge/Components/OnlinePlayPill.cs +++ b/osu.Game/Screens/OnlinePlay/Lounge/Components/OnlinePlayPill.cs @@ -3,6 +3,7 @@ using osu.Framework.Allocation; using osu.Framework.Graphics; +using osu.Framework.Graphics.Sprites; using osu.Game.Graphics; using osu.Game.Graphics.Containers; @@ -12,6 +13,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components { protected PillContainer Pill { get; private set; } = null!; protected OsuTextFlowContainer TextFlow { get; private set; } = null!; + protected virtual FontUsage Font => OsuFont.GetFont(size: 12); protected OnlinePlayPill() { @@ -23,7 +25,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components { InternalChild = Pill = new PillContainer { - Child = TextFlow = new OsuTextFlowContainer(s => s.Font = OsuFont.GetFont(size: 12)) + Child = TextFlow = new OsuTextFlowContainer(s => s.Font = Font) { AutoSizeAxes = Axes.Both, Anchor = Anchor.CentreLeft, diff --git a/osu.Game/Screens/OnlinePlay/Lounge/Components/RoomSpecialCategoryPill.cs b/osu.Game/Screens/OnlinePlay/Lounge/Components/RoomSpecialCategoryPill.cs index e88624f877..10f6e59260 100644 --- a/osu.Game/Screens/OnlinePlay/Lounge/Components/RoomSpecialCategoryPill.cs +++ b/osu.Game/Screens/OnlinePlay/Lounge/Components/RoomSpecialCategoryPill.cs @@ -5,6 +5,7 @@ using osu.Framework.Allocation; using osu.Framework.Extensions; +using osu.Framework.Graphics.Sprites; using osu.Game.Graphics; using osuTK.Graphics; @@ -15,6 +16,8 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components [Resolved] private OsuColour colours { get; set; } + protected override FontUsage Font => base.Font.With(weight: FontWeight.SemiBold); + protected override void LoadComplete() { base.LoadComplete(); diff --git a/osu.Game/Screens/OnlinePlay/Lounge/Components/RoomStatusPill.cs b/osu.Game/Screens/OnlinePlay/Lounge/Components/RoomStatusPill.cs index ab3d293db8..ca9917ad00 100644 --- a/osu.Game/Screens/OnlinePlay/Lounge/Components/RoomStatusPill.cs +++ b/osu.Game/Screens/OnlinePlay/Lounge/Components/RoomStatusPill.cs @@ -6,6 +6,7 @@ using System; using osu.Framework.Allocation; using osu.Framework.Graphics; +using osu.Framework.Graphics.Sprites; using osu.Game.Graphics; using osu.Game.Online.Rooms; using osu.Game.Online.Rooms.RoomStatuses; @@ -20,6 +21,8 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components [Resolved] private OsuColour colours { get; set; } + protected override FontUsage Font => base.Font.With(weight: FontWeight.SemiBold); + protected override void LoadComplete() { base.LoadComplete();