From 8e89239daad915f2b7b84f249a1d924f4911d8d4 Mon Sep 17 00:00:00 2001 From: Tig Date: Mon, 22 Dec 2025 21:19:13 -0700 Subject: [PATCH] Update Dialog.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- Terminal.Gui/Views/Dialog.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Terminal.Gui/Views/Dialog.cs b/Terminal.Gui/Views/Dialog.cs index 1d0aa8cd4..a7771c9a6 100644 --- a/Terminal.Gui/Views/Dialog.cs +++ b/Terminal.Gui/Views/Dialog.cs @@ -184,9 +184,12 @@ public class Dialog : Window // Find the maximum button height var maxHeight = 1; // Default to minimum height of 1 for buttons - foreach (Button button in _buttons.Where (b => b.Frame.Height > maxHeight)) + foreach (Button button in _buttons) { - maxHeight = button.Frame.Height; + if (button.Frame.Height > maxHeight) + { + maxHeight = button.Frame.Height; + } } // Set the bottom padding to match button height