Skip to content

Commit 4ae615d

Browse files
committed
fix: combobox menu items width
fixes #2553 Signed-off-by: Arufonsu <17498701+Arufonsu@users.noreply.github.com>
1 parent dcbd209 commit 4ae615d

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

Intersect.Client.Framework/Gwen/Control/ComboBox.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,10 +422,8 @@ private static void Open(ComboBox @this)
422422
var menuItems = @this._menu.Children.OfType<MenuItem>().ToArray();
423423
foreach (var menuItem in menuItems)
424424
{
425-
menuItem.SizeToContents();
425+
menuItem.AutoSizeToContents = false;
426426
totalChildHeight += menuItem.OuterHeight;
427-
// TODO(2553): I thought this was the solution, it isn't. Results in menu growing each time it's opened.
428-
// width = Math.Max(width, menuItem.OuterWidth + menuPaddingH);
429427
}
430428

431429
var offset = @this.ToCanvas(default);

0 commit comments

Comments
 (0)