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

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,