mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 02:43:19 +08:00
Fix comments having too much padding at the bottom
This commit is contained in:
parent
2ba90b5447
commit
94d2799b90
@ -76,6 +76,7 @@ namespace osu.Game.Overlays.Comments
|
||||
private GridContainer content = null!;
|
||||
private VotePill votePill = null!;
|
||||
private Container<CommentEditor> replyEditorContainer = null!;
|
||||
private Container repliesButtonContainer = null!;
|
||||
|
||||
[Resolved]
|
||||
private IDialogOverlay? dialogOverlay { get; set; }
|
||||
@ -239,10 +240,12 @@ namespace osu.Game.Overlays.Comments
|
||||
AutoSizeAxes = Axes.Y,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Padding = new MarginPadding { Top = 10 },
|
||||
Alpha = 0,
|
||||
},
|
||||
new Container
|
||||
repliesButtonContainer = new Container
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Alpha = 0,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
showRepliesButton = new ShowRepliesButton(Comment.RepliesCount)
|
||||
@ -449,6 +452,7 @@ namespace osu.Game.Overlays.Comments
|
||||
{
|
||||
if (replyEditorContainer.Count == 0)
|
||||
{
|
||||
replyEditorContainer.Show();
|
||||
replyEditorContainer.Add(new ReplyCommentEditor(Comment)
|
||||
{
|
||||
OnPost = comments =>
|
||||
@ -462,6 +466,7 @@ namespace osu.Game.Overlays.Comments
|
||||
else
|
||||
{
|
||||
replyEditorContainer.Clear(true);
|
||||
replyEditorContainer.Hide();
|
||||
}
|
||||
}
|
||||
|
||||
@ -513,9 +518,11 @@ namespace osu.Game.Overlays.Comments
|
||||
int loadedRepliesCount = loadedReplies.Count;
|
||||
bool hasUnloadedReplies = loadedRepliesCount != Comment.RepliesCount;
|
||||
|
||||
loadRepliesButton.FadeTo(hasUnloadedReplies && loadedRepliesCount == 0 ? 1 : 0);
|
||||
showMoreButton.FadeTo(hasUnloadedReplies && loadedRepliesCount > 0 ? 1 : 0);
|
||||
showRepliesButton.FadeTo(loadedRepliesCount != 0 ? 1 : 0);
|
||||
loadRepliesButton.FadeTo(hasUnloadedReplies && loadedRepliesCount == 0 ? 1 : 0);
|
||||
repliesButtonContainer.FadeTo(showRepliesButton.IsPresent || loadRepliesButton.IsPresent ? 1 : 0);
|
||||
|
||||
showMoreButton.FadeTo(hasUnloadedReplies && loadedRepliesCount > 0 ? 1 : 0);
|
||||
|
||||
if (Comment.IsTopLevel)
|
||||
chevronButton.FadeTo(loadedRepliesCount != 0 ? 1 : 0);
|
||||
|
Loading…
Reference in New Issue
Block a user