From b8ce9e8c5904ef676bd01769e9deabcc119df01a Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Fri, 8 Dec 2023 17:01:48 -0600 Subject: [PATCH] Scale up drop down items with text height as needed. --- Source/Engine/UI/GUI/Common/Dropdown.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/Engine/UI/GUI/Common/Dropdown.cs b/Source/Engine/UI/GUI/Common/Dropdown.cs index ecca2978f..31ea87948 100644 --- a/Source/Engine/UI/GUI/Common/Dropdown.cs +++ b/Source/Engine/UI/GUI/Common/Dropdown.cs @@ -469,7 +469,13 @@ namespace FlaxEngine.GUI var itemsHeight = 20.0f; var itemsMargin = 20.0f; - + // Scale height and margive with text height if needed + var textHeight = Font.GetFont().Height; + if (textHeight > itemsHeight) + { + itemsHeight = textHeight; + itemsMargin = textHeight; + } /* var itemsWidth = 40.0f; var font = Font.GetFont();