This commit is contained in:
Andrei Zavatski
2019-10-14 17:33:14 +03:00
parent 139170cdc8
commit d4843285db
5 changed files with 12 additions and 16 deletions

View File

@ -23,13 +23,13 @@ namespace osu.Game.Graphics.UserInterface
public Color4 ChevronIconColour public Color4 ChevronIconColour
{ {
get => chevronIconColour; get => chevronIconColour;
set { chevronIconColour = leftChevron.AccentColour = rightChevron.AccentColour = value; } set => chevronIconColour = leftChevron.AccentColour = rightChevron.AccentColour = value;
} }
public string Text public string Text
{ {
get => text.Text; get => text.Text;
set { text.Text = value; } set => text.Text = value;
} }
private bool isLoading; private bool isLoading;
@ -136,7 +136,7 @@ namespace osu.Game.Graphics.UserInterface
public Color4 AccentColour public Color4 AccentColour
{ {
get => accentColour; get => accentColour;
set { accentColour = Colour = value; } set => accentColour = Colour = value;
} }
public ChevronIcon() public ChevronIcon()

View File

@ -42,7 +42,7 @@ namespace osu.Game.Online.API.Requests.Responses
public string Message { get; set; } public string Message { get; set; }
[JsonProperty(@"message_html")] [JsonProperty(@"message_html")]
public string MessageHTML { get; set; } public string MessageHtml { get; set; }
[JsonProperty(@"replies_count")] [JsonProperty(@"replies_count")]
public int RepliesCount { get; set; } public int RepliesCount { get; set; }
@ -95,7 +95,7 @@ namespace osu.Game.Online.API.Requests.Responses
if (IsDeleted) if (IsDeleted)
return @"deleted"; return @"deleted";
return WebUtility.HtmlDecode(Regex.Replace(MessageHTML, @"<(.|\n)*?>", string.Empty)); return WebUtility.HtmlDecode(Regex.Replace(MessageHtml, @"<(.|\n)*?>", string.Empty));
} }
public int GetDeletedChildsCount() public int GetDeletedChildsCount()

View File

@ -182,6 +182,7 @@ namespace osu.Game.Overlays.Comments
moreButton.Current.Value = response.TopLevelCount - loadedTopLevelComments; moreButton.Current.Value = response.TopLevelCount - loadedTopLevelComments;
moreButton.IsLoading = false; moreButton.IsLoading = false;
} }
moreButton.FadeTo(response.HasMore ? 1 : 0); moreButton.FadeTo(response.HasMore ? 1 : 0);
}, loadCancellation.Token); }, loadCancellation.Token);
} }

View File

@ -28,13 +28,13 @@ namespace osu.Game.Overlays.Comments
private readonly BindableBool childExpanded = new BindableBool(true); private readonly BindableBool childExpanded = new BindableBool(true);
private readonly FillFlowContainer childCommentsVisibilityContainer; private readonly FillFlowContainer childCommentsVisibilityContainer;
private readonly DeletedChildsPlaceholder deletedChildsPlaceholder;
private readonly Comment comment; private readonly Comment comment;
public DrawableComment(Comment comment) public DrawableComment(Comment comment)
{ {
LinkFlowContainer username; LinkFlowContainer username;
FillFlowContainer childCommentsContainer; FillFlowContainer childCommentsContainer;
DeletedChildsPlaceholder deletedChildsPlaceholder;
FillFlowContainer info; FillFlowContainer info;
LinkFlowContainer message; LinkFlowContainer message;
GridContainer content; GridContainer content;
@ -93,7 +93,7 @@ namespace osu.Game.Overlays.Comments
Origin = Anchor.Centre, Origin = Anchor.Centre,
Size = new Vector2(avatar_size), Size = new Vector2(avatar_size),
Masking = true, Masking = true,
CornerRadius = avatar_size / 2, CornerRadius = avatar_size / 2f,
}, },
} }
}, },
@ -118,7 +118,7 @@ namespace osu.Game.Overlays.Comments
new ParentUsername(comment), new ParentUsername(comment),
new SpriteText new SpriteText
{ {
Alpha = comment.IsDeleted? 1 : 0, Alpha = comment.IsDeleted ? 1 : 0,
Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold, italics: true), Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold, italics: true),
Text = @"deleted", Text = @"deleted",
} }
@ -299,8 +299,6 @@ namespace osu.Game.Overlays.Comments
private class ParentUsername : FillFlowContainer, IHasTooltip private class ParentUsername : FillFlowContainer, IHasTooltip
{ {
private const int spacing = 3;
public string TooltipText => comment.ParentComment?.GetMessage() ?? ""; public string TooltipText => comment.ParentComment?.GetMessage() ?? "";
private readonly Comment comment; private readonly Comment comment;
@ -311,7 +309,7 @@ namespace osu.Game.Overlays.Comments
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
Direction = FillDirection.Horizontal; Direction = FillDirection.Horizontal;
Spacing = new Vector2(spacing, 0); Spacing = new Vector2(3, 0);
Alpha = comment.ParentId == null ? 0 : 1; Alpha = comment.ParentId == null ? 0 : 1;
Children = new Drawable[] Children = new Drawable[]
{ {
@ -331,13 +329,10 @@ namespace osu.Game.Overlays.Comments
private class VotePill : CircularContainer private class VotePill : CircularContainer
{ {
private const int height = 20;
private const int margin = 10;
public VotePill(int count) public VotePill(int count)
{ {
AutoSizeAxes = Axes.X; AutoSizeAxes = Axes.X;
Height = height; Height = 20;
Masking = true; Masking = true;
Children = new Drawable[] Children = new Drawable[]
{ {

View File

@ -12,7 +12,7 @@ namespace osu.Game.Overlays.Comments
{ {
public readonly BindableBool Expanded = new BindableBool(true); public readonly BindableBool Expanded = new BindableBool(true);
public ShowChildsButton() protected ShowChildsButton()
{ {
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
} }