mirror of
https://github.com/ppy/osu.git
synced 2025-01-18 18:12:55 +08:00
Keep 'x' symbol visible even while disabled
This commit is contained in:
parent
f12fffd116
commit
050bf9ec60
@ -107,7 +107,6 @@ namespace osu.Game.Overlays.BeatmapListing
|
|||||||
{
|
{
|
||||||
private Container activeContent = null!;
|
private Container activeContent = null!;
|
||||||
private Circle background = null!;
|
private Circle background = null!;
|
||||||
private SpriteIcon icon = null!;
|
|
||||||
|
|
||||||
public MultipleSelectionFilterTabItem(T value)
|
public MultipleSelectionFilterTabItem(T value)
|
||||||
: base(value)
|
: base(value)
|
||||||
@ -129,6 +128,7 @@ namespace osu.Game.Overlays.BeatmapListing
|
|||||||
Alpha = 0,
|
Alpha = 0,
|
||||||
Padding = new MarginPadding
|
Padding = new MarginPadding
|
||||||
{
|
{
|
||||||
|
Left = -16,
|
||||||
Right = -4,
|
Right = -4,
|
||||||
Vertical = -2
|
Vertical = -2
|
||||||
},
|
},
|
||||||
@ -139,9 +139,8 @@ namespace osu.Game.Overlays.BeatmapListing
|
|||||||
Colour = Color4.White,
|
Colour = Color4.White,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
},
|
},
|
||||||
icon = new SpriteIcon
|
new SpriteIcon
|
||||||
{
|
{
|
||||||
Alpha = 0f,
|
|
||||||
Icon = FontAwesome.Solid.TimesCircle,
|
Icon = FontAwesome.Solid.TimesCircle,
|
||||||
Size = new Vector2(10),
|
Size = new Vector2(10),
|
||||||
Colour = ColourProvider.Background4,
|
Colour = ColourProvider.Background4,
|
||||||
@ -172,20 +171,9 @@ namespace osu.Game.Overlays.BeatmapListing
|
|||||||
colour = Active.Value ? colour.Darken(0.2f) : colour.Lighten(0.2f);
|
colour = Active.Value ? colour.Darken(0.2f) : colour.Lighten(0.2f);
|
||||||
|
|
||||||
if (Active.Value)
|
if (Active.Value)
|
||||||
{
|
|
||||||
if (Enabled.Value)
|
|
||||||
{
|
{
|
||||||
// This just allows enough spacing for adjacent tab items to show the "x".
|
// This just allows enough spacing for adjacent tab items to show the "x".
|
||||||
Padding = new MarginPadding { Left = 12 };
|
Padding = new MarginPadding { Left = 12 };
|
||||||
activeContent.Padding = activeContent.Padding with { Left = -16 };
|
|
||||||
icon.Show();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Padding = new MarginPadding();
|
|
||||||
activeContent.Padding = activeContent.Padding with { Left = -4 };
|
|
||||||
icon.Hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
activeContent.FadeIn(200, Easing.OutQuint);
|
activeContent.FadeIn(200, Easing.OutQuint);
|
||||||
background.FadeColour(colour, 200, Easing.OutQuint);
|
background.FadeColour(colour, 200, Easing.OutQuint);
|
||||||
|
Loading…
Reference in New Issue
Block a user