1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 04:13:00 +08:00

Fix warnings/remove obsolete usages

This commit is contained in:
smoogipoo 2019-04-25 18:05:46 +09:00
parent 3b0d4c1bad
commit 1766ed8f9e
5 changed files with 14 additions and 28 deletions

View File

@ -48,12 +48,12 @@ namespace osu.Game.Overlays.Profile.Header
Spacing = new Vector2(0, 10),
Children = new Drawable[]
{
bottomTopLinkContainer = new LinkFlowContainer(text => text.TextSize = 12)
bottomTopLinkContainer = new LinkFlowContainer(text => text.Font = text.Font.With(size: 12))
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
},
bottomLinkContainer = new LinkFlowContainer(text => text.TextSize = 12)
bottomLinkContainer = new LinkFlowContainer(text => text.Font = text.Font.With(size: 12))
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
@ -68,7 +68,7 @@ namespace osu.Game.Overlays.Profile.Header
private void updateDisplay(User user)
{
void bold(SpriteText t) => t.Font = @"Exo2.0-Bold";
void bold(SpriteText t) => t.Font = t.Font.With(weight: FontWeight.Bold);
void addSpacer(OsuTextFlowContainer textFlow) => textFlow.AddArbitraryDrawable(new Container { Width = 15 });
bottomTopLinkContainer.Clear();
@ -113,7 +113,7 @@ namespace osu.Game.Overlays.Profile.Header
bottomLinkContainer.AddIcon(icon, text =>
{
text.TextSize = 10;
text.Font = text.Font.With(size: 10);
text.Colour = communityUserGrayGreenLighter;
});
if (link != null)

View File

@ -213,8 +213,7 @@ namespace osu.Game.Overlays.Profile.Header
},
rankCount = new OsuSpriteText
{
Font = "Exo2.0-Bold",
TextSize = 12,
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Bold),
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre
}

View File

@ -43,8 +43,7 @@ namespace osu.Game.Overlays.Profile.Header
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Text = "No recent plays",
TextSize = 12,
Font = @"Exo2.0-Regular",
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Regular)
},
graph = new RankChartLineGraph
{
@ -227,14 +226,12 @@ namespace osu.Game.Overlays.Profile.Header
{
new OsuSpriteText
{
Font = "Exo2.0-Bold",
TextSize = 12,
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Bold),
Text = "Global Ranking "
},
globalRankingText = new OsuSpriteText
{
Font = "Exo2.0-Regular",
TextSize = 12,
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Regular),
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
}
@ -242,8 +239,7 @@ namespace osu.Game.Overlays.Profile.Header
},
timeText = new OsuSpriteText
{
TextSize = 12,
Font = "Exo2.0-Regular"
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Regular),
}
}
}

View File

@ -75,8 +75,7 @@ namespace osu.Game.Overlays.Profile.Header
{
usernameText = new OsuSpriteText
{
Font = "Exo2.0-Regular",
TextSize = 24
Font = OsuFont.GetFont(size: 24, weight: FontWeight.Regular)
},
openUserExternally = new ExternalLinkButton
{
@ -96,8 +95,7 @@ namespace osu.Game.Overlays.Profile.Header
{
titleText = new OsuSpriteText
{
TextSize = 18,
Font = "Exo2.0-Regular"
Font = OsuFont.GetFont(size: 18, weight: FontWeight.Regular)
},
supporterTag = new SupporterIcon
{
@ -123,8 +121,7 @@ namespace osu.Game.Overlays.Profile.Header
},
userCountryText = new OsuSpriteText
{
Font = "Exo2.0-Regular",
TextSize = 17.5f,
Font = OsuFont.GetFont(size: 17.5f, weight: FontWeight.Regular),
Margin = new MarginPadding { Left = 40 },
Origin = Anchor.CentreLeft,
Anchor = Anchor.CentreLeft,
@ -185,17 +182,15 @@ namespace osu.Game.Overlays.Profile.Header
{
new OsuSpriteText
{
TextSize = 15,
Font = OsuFont.GetFont(size: 15),
Text = left,
Font = "Exo2.0-Medium"
},
new OsuSpriteText
{
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
TextSize = 15,
Font = OsuFont.GetFont(size: 15, weight: FontWeight.Bold),
Text = right,
Font = "Exo2.0-Bold"
},
};
}

View File

@ -12,7 +12,6 @@ using osu.Framework.Bindables;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Profile
@ -29,9 +28,6 @@ namespace osu.Game.Overlays.Profile
{
CenterHeaderContainer centerHeaderContainer;
DetailHeaderContainer detailHeaderContainer;
Container expandedDetailContainer;
FillFlowContainer hiddenDetailContainer, headerDetailContainer;
SpriteIcon expandButtonIcon;
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;