BootManager: improved layouting
Addresses #15418 without completely solving it. At least for font sizes >= 11 points it works mostly. Buttons are no longer cut off, though the summary page showing all partitions is taller than necessary for > 3 partitions, esp. for smaller font sizes. Views aren't vertically centered at least. Change-Id: Id6224b83f27510c9ed45e303f0b5dabf47af0574 Reviewed-on: https://review.haiku-os.org/c/haiku/+/7062 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This commit is contained in:
parent
3c3462995f
commit
6de9c42da6
@ -36,7 +36,7 @@ BootManagerWindow::BootManagerWindow()
|
||||
GetSizeLimits(&minWidth, &maxWidth, &minHeight, &maxHeight);
|
||||
|
||||
minWidth = be_control_look->DefaultLabelSpacing() * 67.0f;
|
||||
minHeight = be_control_look->DefaultLabelSpacing() * 42.0f;
|
||||
minHeight = be_control_look->DefaultLabelSpacing() * 52.0f;
|
||||
SetSizeLimits(minWidth, maxWidth, minHeight, maxHeight);
|
||||
|
||||
fWizardView = new WizardView("wizard");
|
||||
@ -44,7 +44,6 @@ BootManagerWindow::BootManagerWindow()
|
||||
.Add(fWizardView);
|
||||
|
||||
fController.Initialize(fWizardView);
|
||||
|
||||
CenterOnScreen();
|
||||
|
||||
// Prevent minimizing this window if the user would have no way to
|
||||
|
@ -41,5 +41,6 @@ DescriptionPage::_BuildUI(const char* description, bool hasHeading)
|
||||
SetLayout(new BGroupLayout(B_VERTICAL));
|
||||
|
||||
BLayoutBuilder::Group<>((BGroupLayout*)GetLayout())
|
||||
.Add(fDescription);
|
||||
.Add(fDescription)
|
||||
.AddGlue();
|
||||
}
|
||||
|
@ -277,8 +277,8 @@ DrivesPage::DrivesPage(WizardView* wizardView, const BootMenuList& menus,
|
||||
SetLayout(new BGroupLayout(B_VERTICAL));
|
||||
|
||||
BLayoutBuilder::Group<>((BGroupLayout*)GetLayout())
|
||||
.Add(description, 0.5)
|
||||
.Add(scrollView, 1);
|
||||
.Add(description)
|
||||
.Add(scrollView, 10.0);
|
||||
|
||||
_UpdateWizardButtons(NULL);
|
||||
_FillDrivesView(menus);
|
||||
|
@ -110,7 +110,7 @@ PartitionsPage::_BuildUI()
|
||||
|
||||
BLayoutBuilder::Group<>((BGroupLayout*)GetLayout())
|
||||
.Add(fDescription)
|
||||
.Add(scrollView);
|
||||
.Add(scrollView, 10.0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -55,6 +55,7 @@ WizardView::SetPage(WizardPageView* page)
|
||||
return;
|
||||
|
||||
fPageContainer->AddChild(page);
|
||||
Window()->ResizeToPreferred();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user