From e05fbd4136e338537e4ec6f9d64f958413b0f705 Mon Sep 17 00:00:00 2001 From: jorolf Date: Tue, 25 Dec 2018 01:09:49 +0100 Subject: [PATCH] address some comments and improve ui --- .../Overlays/Profile/Header/ProfileHeaderTabControl.cs | 2 +- osu.Game/Overlays/Profile/Header/RankGraph.cs | 2 ++ osu.Game/Overlays/Profile/ProfileHeader.cs | 10 +++++++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/osu.Game/Overlays/Profile/Header/ProfileHeaderTabControl.cs b/osu.Game/Overlays/Profile/Header/ProfileHeaderTabControl.cs index 2576d627ea..db8a0b594c 100644 --- a/osu.Game/Overlays/Profile/Header/ProfileHeaderTabControl.cs +++ b/osu.Game/Overlays/Profile/Header/ProfileHeaderTabControl.cs @@ -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() diff --git a/osu.Game/Overlays/Profile/Header/RankGraph.cs b/osu.Game/Overlays/Profile/Header/RankGraph.cs index 76a72fe420..e681d2701a 100644 --- a/osu.Game/Overlays/Profile/Header/RankGraph.cs +++ b/osu.Game/Overlays/Profile/Header/RankGraph.cs @@ -234,6 +234,8 @@ namespace osu.Game.Overlays.Profile.Header { Font = "Exo2.0-Regular", TextSize = 12, + Anchor = Anchor.BottomLeft, + Origin = Anchor.BottomLeft, } } }, diff --git a/osu.Game/Overlays/Profile/ProfileHeader.cs b/osu.Game/Overlays/Profile/ProfileHeader.cs index 77074abd09..7429a65210 100644 --- a/osu.Game/Overlays/Profile/ProfileHeader.cs +++ b/osu.Game/Overlays/Profile/ProfileHeader.cs @@ -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;