From 88480e0dc2b1b586cdf3f5dc3c47e348717a77ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Mon, 16 Jun 2014 10:17:30 +0200 Subject: [PATCH] make it clear that this does not need to match content height --- OpenRA.Game/Widgets/DropDownButtonWidget.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenRA.Game/Widgets/DropDownButtonWidget.cs b/OpenRA.Game/Widgets/DropDownButtonWidget.cs index edf97a7ba3..d30db90d50 100644 --- a/OpenRA.Game/Widgets/DropDownButtonWidget.cs +++ b/OpenRA.Game/Widgets/DropDownButtonWidget.cs @@ -87,7 +87,7 @@ namespace OpenRA.Widgets Ui.Root.AddChild(panel); } - public void ShowDropDown(string panelTemplate, int height, IEnumerable options, Func setupItem) + public void ShowDropDown(string panelTemplate, int maxHeight, IEnumerable options, Func setupItem) { var substitutions = new Dictionary() {{ "DROPDOWN_WIDTH", Bounds.Width }}; var panel = (ScrollPanelWidget)Ui.LoadWidget(panelTemplate, null, new WidgetArgs() @@ -106,7 +106,7 @@ namespace OpenRA.Widgets panel.AddChild(item); } - panel.Bounds.Height = Math.Min(height, panel.ContentHeight); + panel.Bounds.Height = Math.Min(maxHeight, panel.ContentHeight); AttachPanel(panel); }