1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 15:47:26 +08:00

Fix menu item width changing when hovered

This commit is contained in:
Bartłomiej Dach 2022-01-23 16:36:18 +01:00
parent 3386f038ba
commit b613aedeb8
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -117,6 +117,7 @@ namespace osu.Game.Graphics.UserInterface
{ {
NormalText = new OsuSpriteText NormalText = new OsuSpriteText
{ {
AlwaysPresent = true, // ensures that the menu item does not change width when switching between normal and bold text.
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,
Font = OsuFont.GetFont(size: text_size), Font = OsuFont.GetFont(size: text_size),
@ -124,7 +125,7 @@ namespace osu.Game.Graphics.UserInterface
}, },
BoldText = new OsuSpriteText BoldText = new OsuSpriteText
{ {
AlwaysPresent = true, AlwaysPresent = true, // ensures that the menu item does not change width when switching between normal and bold text.
Alpha = 0, Alpha = 0,
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,