mirror of
https://github.com/ppy/osu
synced 2024-12-27 17:32:56 +00:00
Use normal OsuScrollContainer
for ChannelList
This commit is contained in:
parent
47c8b8010f
commit
44c822f34d
@ -40,7 +40,7 @@ namespace osu.Game.Overlays.Chat.ChannelList
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = colourProvider.Background6,
|
||||
},
|
||||
new ChannelListScrollContainer
|
||||
new OsuScrollContainer
|
||||
{
|
||||
Padding = new MarginPadding { Vertical = 7 },
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
@ -131,31 +131,5 @@ namespace osu.Game.Overlays.Chat.ChannelList
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private class ChannelListScrollContainer : OsuScrollContainer
|
||||
{
|
||||
protected override ScrollbarContainer CreateScrollbar(Direction direction)
|
||||
=> new ChannelListScrollBar(direction);
|
||||
|
||||
protected class ChannelListScrollBar : OsuScrollbar
|
||||
{
|
||||
private const float bar_size = 4;
|
||||
private const float bar_margin = 7;
|
||||
|
||||
public ChannelListScrollBar(Direction scrollDir)
|
||||
: base(scrollDir)
|
||||
{
|
||||
Size = new Vector2(bar_size);
|
||||
Margin = new MarginPadding { Horizontal = bar_margin };
|
||||
CornerRadius = 2;
|
||||
}
|
||||
|
||||
public override void ResizeTo(float val, int duration = 0, Easing easing = Easing.None)
|
||||
{
|
||||
Vector2 size = new Vector2(bar_size, val);
|
||||
this.ResizeTo(size, duration, easing);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user