1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:12:54 +08:00

Fix changes to font weight in a couple of combined implementations

This commit is contained in:
Dean Herbert 2023-05-25 19:55:11 +09:00
parent 4441718437
commit 609c7227ee
3 changed files with 9 additions and 1 deletions

View File

@ -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,

View File

@ -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();

View File

@ -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();