From 6ee62ca6c6ac6b8159660ec2c7269e8bd09f4322 Mon Sep 17 00:00:00 2001 From: PulkoMandy Date: Sun, 15 May 2022 13:33:36 +0200 Subject: [PATCH] Installer: make sure there is space for 5 lines of text in the status view Fixes #17095 Change-Id: I53752d6ee60a913f230dc44eddac7f872db6c184 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5314 Tested-by: Commit checker robot Reviewed-by: Adrien Destugues --- src/apps/installer/InstallerWindow.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/apps/installer/InstallerWindow.cpp b/src/apps/installer/InstallerWindow.cpp index c54da2dea8..75212b40dc 100644 --- a/src/apps/installer/InstallerWindow.cpp +++ b/src/apps/installer/InstallerWindow.cpp @@ -180,11 +180,16 @@ InstallerWindow::InstallerWindow() BSize logoSize = logoView->MinSize(); logoView->SetExplicitMaxSize(logoSize); - fStatusView->SetExplicitMinSize(BSize(fStatusView->StringWidth("W") * 22, - logoSize.height)); - // Explicitly create group view to set the background white in case - // height resizing is needed for the status view + // Make sure we can display 5 lines of text of 22 about charactrs each in the status view + font_height height; + fStatusView->GetFontHeight(&height); + float fontHeight = height.ascent + height.descent + height.leading; + fStatusView->SetExplicitMinSize(BSize(fStatusView->StringWidth("W") * 22, + fontHeight * 5 + 8)); + + // Create a group view with a white background since the logo and status text won't have the + // same height, this background will show in the remaining space fLogoGroup = new BGroupView(B_HORIZONTAL, 10); fLogoGroup->SetViewColor(255, 255, 255); fLogoGroup->GroupLayout()->SetInsets(0, 0, 10, 0);