mirror of
https://github.com/ppy/osu
synced 2024-12-11 17:42:28 +00:00
Move ChannelListingItem
spacing into item so input is always handled by an item in the list
Without this change, there would be a couple of pixels between each list item where nothing would be hovered. This is a pretty annoying UX which we should be avoiding we possible.
This commit is contained in:
parent
1a187d4dec
commit
46f2db1712
@ -12,7 +12,6 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Online.Chat;
|
using osu.Game.Online.Chat;
|
||||||
using osuTK;
|
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Chat.Listing
|
namespace osu.Game.Overlays.Chat.Listing
|
||||||
{
|
{
|
||||||
@ -51,7 +50,6 @@ namespace osu.Game.Overlays.Chat.Listing
|
|||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Spacing = new Vector2(3),
|
|
||||||
Padding = new MarginPadding
|
Padding = new MarginPadding
|
||||||
{
|
{
|
||||||
Vertical = 13,
|
Vertical = 13,
|
||||||
|
@ -43,6 +43,8 @@ namespace osu.Game.Overlays.Chat.Listing
|
|||||||
private const float text_size = 18;
|
private const float text_size = 18;
|
||||||
private const float icon_size = 14;
|
private const float icon_size = 14;
|
||||||
|
|
||||||
|
private const float vertical_margin = 1.5f;
|
||||||
|
|
||||||
public ChannelListingItem(Channel channel)
|
public ChannelListingItem(Channel channel)
|
||||||
{
|
{
|
||||||
this.channel = channel;
|
this.channel = channel;
|
||||||
@ -54,7 +56,7 @@ namespace osu.Game.Overlays.Chat.Listing
|
|||||||
Masking = true;
|
Masking = true;
|
||||||
CornerRadius = 5;
|
CornerRadius = 5;
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
Height = 20;
|
Height = 20 + (vertical_margin * 2);
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -62,6 +64,7 @@ namespace osu.Game.Overlays.Chat.Listing
|
|||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = colourProvider.Background3,
|
Colour = colourProvider.Background3,
|
||||||
|
Margin = new MarginPadding { Vertical = vertical_margin },
|
||||||
Alpha = 0f,
|
Alpha = 0f,
|
||||||
},
|
},
|
||||||
new GridContainer
|
new GridContainer
|
||||||
|
Loading…
Reference in New Issue
Block a user