address some comments and improve ui

This commit is contained in:
jorolf
2018-12-25 01:09:49 +01:00
parent 360c17e2c7
commit e05fbd4136
3 changed files with 12 additions and 2 deletions

View File

@ -38,8 +38,8 @@ namespace osu.Game.Overlays.Profile.Header
public MarginPadding Padding
{
set => TabContainer.Padding = value;
get => TabContainer.Padding;
set => TabContainer.Padding = value;
}
public ProfileHeaderTabControl()

View File

@ -234,6 +234,8 @@ namespace osu.Game.Overlays.Profile.Header
{
Font = "Exo2.0-Regular",
TextSize = 12,
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
}
}
},

View File

@ -20,6 +20,7 @@ using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.API;
using osu.Game.Online.Chat;
using osu.Game.Overlays.Profile.Header;
using osu.Game.Scoring;
@ -95,6 +96,9 @@ namespace osu.Game.Overlays.Profile
[Resolved(CanBeNull = true)]
private ChatOverlay chatOverlay { get; set; }
[Resolved]
private APIAccess apiAccess { get; set; }
public ProfileHeader()
{
Container expandedDetailContainer;
@ -340,6 +344,7 @@ namespace osu.Game.Overlays.Profile
},
messageButton = new ProfileHeaderButton
{
Alpha = 0,
RelativeSizeAxes = Axes.Y,
Children = new Drawable[]
{
@ -734,13 +739,16 @@ namespace osu.Game.Overlays.Profile
followerText.Text = user.FollowerCount?.Length > 0 ? user.FollowerCount[0].ToString("#,##0") : "0";
if (!user.PMFriendsOnly)
if (!user.PMFriendsOnly && apiAccess.LocalUser.Value.Id != user.Id)
{
messageButton.Show();
messageButton.Action = () =>
{
channelManager?.OpenPrivateChannel(user);
userOverlay?.Hide();
chatOverlay?.Show();
};
}
expandButton.Action = DetailsVisible.Toggle;