Browse Source

Fixes the MenuIem Width for wider runes

BDisp 3 years ago
parent
commit
5dc5bebbd5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Terminal.Gui/Views/Menu.cs

+ 1 - 1
Terminal.Gui/Views/Menu.cs

@@ -135,7 +135,7 @@ namespace Terminal.Gui {
 			return CanExecute == null ? true : CanExecute ();
 		}
 
-		internal int Width => Title.RuneCount + Help.RuneCount + 1 + 2 +
+		internal int Width => Title.Sum (x => Rune.ColumnWidth (x)) + Help.Sum (x => Rune.ColumnWidth (x)) + 1 + 2 +
 			(Checked || CheckType.HasFlag (MenuItemCheckStyle.Checked) || CheckType.HasFlag (MenuItemCheckStyle.Radio) ? 2 : 0) +
 			(ShortcutTag.RuneCount > 0 ? ShortcutTag.RuneCount + 2 : 0);