Replace copy-constructor/method with extension method

This commit is contained in:
smoogipoo
2019-02-20 19:32:30 +09:00
parent dbfa95b9e7
commit 4db5531e4b
40 changed files with 66 additions and 68 deletions

View File

@ -165,7 +165,7 @@ namespace osu.Game.Overlays.Profile
Y = cover_height,
Colour = OsuColour.Gray(34),
},
infoTextLeft = new LinkFlowContainer(t => t.Font = OsuFont.GetFont(t.Font, size: 14))
infoTextLeft = new LinkFlowContainer(t => t.Font = t.Font.With(size: 14))
{
X = UserProfileOverlay.CONTENT_X_MARGIN,
Y = cover_height + 20,
@ -349,7 +349,7 @@ namespace osu.Game.Overlays.Profile
colourBar.Show();
}
void boldItalic(SpriteText t) => t.Font = OsuFont.GetFont(t.Font, weight: FontWeight.Bold, italics: true);
void boldItalic(SpriteText t) => t.Font = t.Font.With(weight: FontWeight.Bold, italics: true);
void lightText(SpriteText t) => t.Alpha = 0.8f;
OsuSpriteText createScoreText(string text) => new OsuSpriteText

View File

@ -119,7 +119,7 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
}
}
},
new OsuTextFlowContainer(t => t.Font = OsuFont.GetFont(t.Font, size: 19))
new OsuTextFlowContainer(t => t.Font = t.Font.With(size: 19))
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,