1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 07:43:00 +08:00

Truncate long dropdown menu item text and show tooltip

This commit is contained in:
Joseph Madamba 2024-02-14 23:00:30 -08:00
parent 401bd91dc4
commit 3d08bc5605

View File

@ -186,6 +186,8 @@ namespace osu.Game.Graphics.UserInterface
: base(item)
{
Foreground.Padding = new MarginPadding(2);
Foreground.AutoSizeAxes = Axes.Y;
Foreground.RelativeSizeAxes = Axes.X;
Masking = true;
CornerRadius = corner_radius;
@ -247,11 +249,12 @@ namespace osu.Game.Graphics.UserInterface
Origin = Anchor.CentreLeft,
Anchor = Anchor.CentreLeft,
},
Label = new OsuSpriteText
Label = new TruncatingSpriteText
{
X = 15,
Padding = new MarginPadding { Left = 15 },
Origin = Anchor.CentreLeft,
Anchor = Anchor.CentreLeft,
RelativeSizeAxes = Axes.X,
},
};
}