mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:33:30 +08:00
Truncate long dropdown menu item text and show tooltip
This commit is contained in:
parent
401bd91dc4
commit
3d08bc5605
@ -186,6 +186,8 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
: base(item)
|
: base(item)
|
||||||
{
|
{
|
||||||
Foreground.Padding = new MarginPadding(2);
|
Foreground.Padding = new MarginPadding(2);
|
||||||
|
Foreground.AutoSizeAxes = Axes.Y;
|
||||||
|
Foreground.RelativeSizeAxes = Axes.X;
|
||||||
|
|
||||||
Masking = true;
|
Masking = true;
|
||||||
CornerRadius = corner_radius;
|
CornerRadius = corner_radius;
|
||||||
@ -247,11 +249,12 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
Origin = Anchor.CentreLeft,
|
Origin = Anchor.CentreLeft,
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
},
|
},
|
||||||
Label = new OsuSpriteText
|
Label = new TruncatingSpriteText
|
||||||
{
|
{
|
||||||
X = 15,
|
Padding = new MarginPadding { Left = 15 },
|
||||||
Origin = Anchor.CentreLeft,
|
Origin = Anchor.CentreLeft,
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user