From 2ac78cc4d6e2944c3848112ff2bf043c2fd5d44c Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Wed, 28 Sep 2022 17:54:54 -0400 Subject: [PATCH] BootManager: Fix minimum window size assignment. --- src/apps/bootmanager/BootManagerWindow.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/apps/bootmanager/BootManagerWindow.cpp b/src/apps/bootmanager/BootManagerWindow.cpp index 24330c3fdd..bd58c133d5 100644 --- a/src/apps/bootmanager/BootManagerWindow.cpp +++ b/src/apps/bootmanager/BootManagerWindow.cpp @@ -11,6 +11,7 @@ #include #include +#include #include #include #include @@ -29,17 +30,13 @@ BootManagerWindow::BootManagerWindow() : BWindow(BRect(100, 100, 500, 400), B_TRANSLATE_SYSTEM_NAME("BootManager"), - B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE - | B_AUTO_UPDATE_SIZE_LIMITS) + B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE) { float minWidth, maxWidth, minHeight, maxHeight; GetSizeLimits(&minWidth, &maxWidth, &minHeight, &maxHeight); - // Use font to determine necessary size of window: - const BFont* font = be_plain_font; - minWidth = 400 * (double)font->Size() / 12.0f; - minHeight = 250 * (double)font->Size() / 12.0f; - + minWidth = be_control_look->DefaultLabelSpacing() * 67.0f; + minHeight = be_control_look->DefaultLabelSpacing() * 42.0f; SetSizeLimits(minWidth, maxWidth, minHeight, maxHeight); fWizardView = new WizardView("wizard");