Skip to content

Commit 4cb4d89

Browse files
committed
Second pass of info wedge metrics
1 parent 0e6c2dd commit 4cb4d89

File tree

3 files changed

+20
-25
lines changed

3 files changed

+20
-25
lines changed

osu.Game/Screens/SelectV2/BeatmapInfoWedge.cs

+11-18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
2-
// See the LICENCE file in the repository root for full licence text.
31

42
using System;
53
using System.Collections.Generic;
@@ -83,9 +81,6 @@ private void load()
8381
Masking = true;
8482
CornerRadius = corner_radius;
8583

86-
// Hide the top edge of the wedge off-screen (so we don't see the corner).
87-
Margin = new MarginPadding { Top = -corner_radius };
88-
8984
InternalChildren = new Drawable[]
9085
{
9186
new WedgeBackground(),
@@ -94,28 +89,26 @@ private void load()
9489
RelativeSizeAxes = Axes.X,
9590
AutoSizeAxes = Axes.Y,
9691
Direction = FillDirection.Vertical,
97-
Padding = new MarginPadding { Left = SongSelect.WEDGE_CONTENT_MARGIN },
92+
Padding = new MarginPadding
93+
{
94+
Top = SongSelect.WEDGE_CONTENT_MARGIN,
95+
Left = SongSelect.WEDGE_CONTENT_MARGIN
96+
},
9897
Spacing = new Vector2(0f, 4f),
9998
Shear = -shear,
10099
Children = new Drawable[]
101100
{
102-
new ShearAlignedDrawable(shear, new Container
101+
new ShearAlignedDrawable(shear, statusPill = new BeatmapSetOnlineStatusPill
103102
{
104-
RelativeSizeAxes = Axes.X,
105-
Height = 35,
106-
Child = statusPill = new BeatmapSetOnlineStatusPill
107-
{
108-
AutoSizeAxes = Axes.Both,
109-
Margin = new MarginPadding { Right = 20f, Top = 20f },
110-
TextSize = OsuFont.Caption.Size,
111-
TextPadding = new MarginPadding { Horizontal = 6, Vertical = 1 },
112-
}
103+
ShowUnknownStatus = true,
104+
TextSize = OsuFont.Caption.Size,
105+
TextPadding = new MarginPadding { Horizontal = 6, Vertical = 1 },
113106
}),
114107
new ShearAlignedDrawable(shear, titleContainer = new Container
115108
{
116109
RelativeSizeAxes = Axes.X,
117-
Height = OsuFont.Title.Size + 2,
118-
Margin = new MarginPadding { Bottom = -5f },
110+
Height = OsuFont.Title.Size,
111+
Margin = new MarginPadding { Bottom = -4f },
119112
Child = titleLink = new OsuHoverContainer
120113
{
121114
AutoSizeAxes = Axes.Both,

osu.Game/Screens/SelectV2/BeatmapWedgesTabControl.cs

+2-4
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,10 @@ protected override bool OnHover(HoverEvent e)
108108

109109
private void updateDisplay()
110110
{
111-
if (Active.Value)
111+
if (Active.Value || IsHovered)
112112
Text.FadeColour(colourProvider.Content1, 300, Easing.OutQuint);
113-
else if (IsHovered)
114-
Text.FadeColour(colourProvider.Content2, 300, Easing.OutQuint);
115113
else
116-
Text.FadeColour(colourProvider.Foreground1, 300, Easing.OutQuint);
114+
Text.FadeColour(colourProvider.Content2, 300, Easing.OutQuint);
117115

118116
Text.Font = Text.Font.With(weight: Active.Value ? FontWeight.SemiBold : FontWeight.Regular);
119117
}

osu.Game/Screens/SelectV2/SongSelect.cs

+7-3
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ public abstract partial class SongSelect : ScreenWithBeatmapBackground
3333
{
3434
private const float logo_scale = 0.4f;
3535

36-
public const float WEDGE_CONTENT_MARGIN = corner_radius_hide_offset + OsuGame.SCREEN_EDGE_MARGIN;
36+
public const float WEDGE_CONTENT_MARGIN = CORNER_RADIUS_HIDE_OFFSET + OsuGame.SCREEN_EDGE_MARGIN;
3737

38-
private const float corner_radius_hide_offset = 20f;
38+
public const float CORNER_RADIUS_HIDE_OFFSET = 20f;
3939

4040
public const double ENTER_DURATION = 600;
4141

@@ -109,7 +109,11 @@ private void load()
109109
wedgesContainer = new FillFlowContainer
110110
{
111111
RelativeSizeAxes = Axes.Both,
112-
Margin = new MarginPadding { Left = -corner_radius_hide_offset },
112+
Margin = new MarginPadding
113+
{
114+
Top = -CORNER_RADIUS_HIDE_OFFSET,
115+
Left = -CORNER_RADIUS_HIDE_OFFSET
116+
},
113117
Spacing = new Vector2(0f, 4f),
114118
Direction = FillDirection.Vertical,
115119
Children = new Drawable[]

0 commit comments

Comments
 (0)