mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 16:25:32 +08:00
Merge pull request #7670 from TheWildTree/recolor-profile-sections
Bring UserProfileOverlay colour scheme in line with web
This commit is contained in:
commit
2beb10b860
@ -4,10 +4,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Overlays.Profile.Sections;
|
||||
using osu.Game.Overlays.Profile.Sections.Historical;
|
||||
using osu.Game.Users;
|
||||
@ -27,6 +29,9 @@ namespace osu.Game.Tests.Visual.Online
|
||||
typeof(DrawableProfileRow)
|
||||
};
|
||||
|
||||
[Cached]
|
||||
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Pink);
|
||||
|
||||
public TestSceneHistoricalSection()
|
||||
{
|
||||
HistoricalSection section;
|
||||
|
@ -18,11 +18,11 @@ namespace osu.Game.Overlays
|
||||
protected IAPIProvider API { get; private set; }
|
||||
|
||||
[Cached]
|
||||
private readonly OverlayColourProvider colourProvider;
|
||||
protected readonly OverlayColourProvider ColourProvider;
|
||||
|
||||
protected FullscreenOverlay(OverlayColourScheme colourScheme)
|
||||
{
|
||||
colourProvider = new OverlayColourProvider(colourScheme);
|
||||
ColourProvider = new OverlayColourProvider(colourScheme);
|
||||
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
RelativePositionAxes = Axes.Both;
|
||||
@ -43,10 +43,10 @@ namespace osu.Game.Overlays
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
Waves.FirstWaveColour = colourProvider.Light4;
|
||||
Waves.SecondWaveColour = colourProvider.Light3;
|
||||
Waves.ThirdWaveColour = colourProvider.Dark4;
|
||||
Waves.FourthWaveColour = colourProvider.Dark3;
|
||||
Waves.FirstWaveColour = ColourProvider.Light4;
|
||||
Waves.SecondWaveColour = ColourProvider.Light3;
|
||||
Waves.ThirdWaveColour = ColourProvider.Dark4;
|
||||
Waves.FourthWaveColour = ColourProvider.Dark3;
|
||||
}
|
||||
|
||||
public override void Show()
|
||||
|
@ -33,16 +33,16 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
{
|
||||
iconColour = colours.GreySeafoamLighter;
|
||||
iconColour = colourProvider.Foreground1;
|
||||
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = colours.GreySeafoamDark,
|
||||
Colour = colourProvider.Background4
|
||||
},
|
||||
new FillFlowContainer
|
||||
{
|
||||
|
@ -7,7 +7,6 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Overlays.Profile.Header.Components;
|
||||
using osu.Game.Users;
|
||||
using osuTK;
|
||||
@ -28,7 +27,7 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours, TextureStore textures)
|
||||
private void load(OverlayColourProvider colourProvider, TextureStore textures)
|
||||
{
|
||||
Container<Drawable> hiddenDetailContainer;
|
||||
Container<Drawable> expandedDetailContainer;
|
||||
@ -38,7 +37,7 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = colours.GreySeafoam
|
||||
Colour = colourProvider.Background4
|
||||
},
|
||||
new FillFlowContainer
|
||||
{
|
||||
@ -119,12 +118,12 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
hiddenDetailGlobal = new OverlinedInfoContainer
|
||||
{
|
||||
Title = "Global Ranking",
|
||||
LineColour = colours.Yellow
|
||||
LineColour = colourProvider.Highlight1
|
||||
},
|
||||
hiddenDetailCountry = new OverlinedInfoContainer
|
||||
{
|
||||
Title = "Country Ranking",
|
||||
LineColour = colours.Yellow
|
||||
LineColour = colourProvider.Highlight1
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Graphics;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Overlays.Profile.Header.Components
|
||||
@ -25,10 +24,10 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
{
|
||||
IdleColour = colours.GreySeafoamLight;
|
||||
HoverColour = colours.GreySeafoamLight.Darken(0.2f);
|
||||
IdleColour = colourProvider.Background2;
|
||||
HoverColour = colourProvider.Background2.Lighten(0.2f);
|
||||
|
||||
Child = icon = new SpriteIcon
|
||||
{
|
||||
|
@ -43,7 +43,8 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
||||
line = new Circle
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 4,
|
||||
Height = 2,
|
||||
Margin = new MarginPadding { Bottom = 2 }
|
||||
},
|
||||
title = new OsuSpriteText
|
||||
{
|
||||
|
@ -6,7 +6,6 @@ using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Overlays.Profile.Header.Components
|
||||
@ -27,12 +26,12 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
{
|
||||
InternalChild = info = new OverlinedInfoContainer
|
||||
{
|
||||
Title = "Total Play Time",
|
||||
LineColour = colours.Yellow,
|
||||
LineColour = colourProvider.Highlight1,
|
||||
};
|
||||
|
||||
User.BindValueChanged(updateTime, true);
|
||||
|
@ -54,7 +54,7 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
private void load(OverlayColourProvider colourProvider, OsuColour colours)
|
||||
{
|
||||
AutoSizeAxes = Axes.Y;
|
||||
|
||||
@ -65,7 +65,7 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = colours.GreySeafoamDarker,
|
||||
Colour = colourProvider.Background5,
|
||||
},
|
||||
fillFlow = new FillFlowContainer
|
||||
{
|
||||
@ -152,12 +152,12 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
detailGlobalRank = new OverlinedInfoContainer(true, 110)
|
||||
{
|
||||
Title = "Global Ranking",
|
||||
LineColour = colours.Yellow,
|
||||
LineColour = colourProvider.Highlight1,
|
||||
},
|
||||
detailCountryRank = new OverlinedInfoContainer(false, 110)
|
||||
{
|
||||
Title = "Country Ranking",
|
||||
LineColour = colours.Yellow,
|
||||
LineColour = colourProvider.Highlight1,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Colour;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Overlays.Profile.Header.Components;
|
||||
using osu.Game.Users;
|
||||
using osuTK;
|
||||
@ -23,7 +22,7 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
public readonly Bindable<User> User = new Bindable<User>();
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
{
|
||||
Alpha = 0;
|
||||
AutoSizeAxes = Axes.Y;
|
||||
@ -34,7 +33,7 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = colours.GreySeafoamDarker,
|
||||
Colour = colourProvider.Background5,
|
||||
},
|
||||
new Container //artificial shadow
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
private FillFlowContainer userStats;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
{
|
||||
Height = 150;
|
||||
|
||||
@ -42,7 +42,7 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = colours.GreySeafoamDark,
|
||||
Colour = colourProvider.Background5,
|
||||
},
|
||||
new FillFlowContainer
|
||||
{
|
||||
@ -117,7 +117,7 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 1.5f,
|
||||
Margin = new MarginPadding { Top = 10 },
|
||||
Colour = colours.GreySeafoamLighter,
|
||||
Colour = colourProvider.Light1,
|
||||
},
|
||||
new FillFlowContainer
|
||||
{
|
||||
@ -137,7 +137,7 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
Margin = new MarginPadding { Left = 10 },
|
||||
Origin = Anchor.CentreLeft,
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Colour = colours.GreySeafoamLighter,
|
||||
Colour = colourProvider.Light1,
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -95,10 +95,10 @@ namespace osu.Game.Overlays.Profile
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
{
|
||||
background.Colour = colours.GreySeafoamDarker;
|
||||
underscore.Colour = colours.Seafoam;
|
||||
background.Colour = colourProvider.Background5;
|
||||
underscore.Colour = colourProvider.Highlight1;
|
||||
}
|
||||
|
||||
private class SectionTriangles : Container
|
||||
@ -128,11 +128,11 @@ namespace osu.Game.Overlays.Profile
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
{
|
||||
triangles.ColourLight = colours.GreySeafoamDark;
|
||||
triangles.ColourDark = colours.GreySeafoamDarker.Darken(0.2f);
|
||||
foreground.Colour = ColourInfo.GradientVertical(colours.GreySeafoamDarker, colours.GreySeafoamDarker.Opacity(0));
|
||||
triangles.ColourLight = colourProvider.Background4;
|
||||
triangles.ColourDark = colourProvider.Background5.Darken(0.2f);
|
||||
foreground.Colour = ColourInfo.GradientVertical(colourProvider.Background5, colourProvider.Background5.Opacity(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
|
||||
{
|
||||
Masking = true,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 5,
|
||||
Height = 2,
|
||||
Child = lineBackground = new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
@ -128,10 +128,10 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
{
|
||||
lineBackground.Colour = colours.Yellow;
|
||||
DescriptionText.Colour = colours.GreySeafoamLighter;
|
||||
lineBackground.Colour = colourProvider.Highlight1;
|
||||
DescriptionText.Colour = colourProvider.Foreground1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
|
||||
namespace osu.Game.Overlays.Profile.Sections
|
||||
@ -10,11 +9,11 @@ namespace osu.Game.Overlays.Profile.Sections
|
||||
public class ProfileShowMoreButton : ShowMoreButton
|
||||
{
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colors)
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
{
|
||||
IdleColour = colors.GreySeafoamDark;
|
||||
HoverColour = colors.GreySeafoam;
|
||||
ChevronIconColour = colors.Yellow;
|
||||
IdleColour = colourProvider.Background2;
|
||||
HoverColour = colourProvider.Background1;
|
||||
ChevronIconColour = colourProvider.Foreground1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Online.API.Requests;
|
||||
using osu.Game.Overlays.Profile;
|
||||
@ -30,7 +29,7 @@ namespace osu.Game.Overlays
|
||||
public const float CONTENT_X_MARGIN = 70;
|
||||
|
||||
public UserProfileOverlay()
|
||||
: base(OverlayColourScheme.Green)
|
||||
: base(OverlayColourScheme.Pink)
|
||||
{
|
||||
}
|
||||
|
||||
@ -74,7 +73,7 @@ namespace osu.Game.Overlays
|
||||
Add(new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = OsuColour.Gray(0.1f)
|
||||
Colour = ColourProvider.Background6
|
||||
});
|
||||
|
||||
Add(sectionsContainer = new ProfileSectionsContainer
|
||||
@ -83,7 +82,8 @@ namespace osu.Game.Overlays
|
||||
FixedHeader = tabs,
|
||||
HeaderBackground = new Box
|
||||
{
|
||||
Colour = OsuColour.Gray(34),
|
||||
// this is only visible as the ProfileTabControl background
|
||||
Colour = ColourProvider.Background5,
|
||||
RelativeSizeAxes = Axes.Both
|
||||
},
|
||||
});
|
||||
@ -165,9 +165,9 @@ namespace osu.Game.Overlays
|
||||
};
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
{
|
||||
AccentColour = colours.Seafoam;
|
||||
AccentColour = colourProvider.Highlight1;
|
||||
}
|
||||
|
||||
private class ProfileTabItem : OverlayTabItem
|
||||
|
Loading…
Reference in New Issue
Block a user