mirror of https://github.com/ppy/osu
Fix comment edited at date not showing tooltip
This commit is contained in:
parent
335af04764
commit
e838a5d9f0
|
@ -9,7 +9,6 @@
|
|||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Users.Drawables;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Utils;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Bindables;
|
||||
using System.Linq;
|
||||
|
@ -245,11 +244,32 @@ private void load(OverlayColourProvider colourProvider)
|
|||
|
||||
if (Comment.EditedAt.HasValue)
|
||||
{
|
||||
info.Add(new OsuSpriteText
|
||||
var font = OsuFont.GetFont(size: 12, weight: FontWeight.Regular);
|
||||
var colour = colourProvider.Foreground1;
|
||||
|
||||
info.Add(new FillFlowContainer
|
||||
{
|
||||
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Regular),
|
||||
Text = $@"edited {HumanizerUtils.Humanize(Comment.EditedAt.Value)} by {Comment.EditedUser.Username}",
|
||||
Colour = colourProvider.Foreground1
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new OsuSpriteText
|
||||
{
|
||||
Font = font,
|
||||
Text = "edited ",
|
||||
Colour = colour
|
||||
},
|
||||
new DrawableDate(Comment.EditedAt.Value)
|
||||
{
|
||||
Font = font,
|
||||
Colour = colour
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Font = font,
|
||||
Text = $@" by {Comment.EditedUser.Username}",
|
||||
Colour = colour
|
||||
},
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue