BootManager: Fix minimum window size assignment.
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <Catalog.h>
|
#include <Catalog.h>
|
||||||
|
#include <ControlLook.h>
|
||||||
#include <LayoutBuilder.h>
|
#include <LayoutBuilder.h>
|
||||||
#include <Roster.h>
|
#include <Roster.h>
|
||||||
#include <Screen.h>
|
#include <Screen.h>
|
||||||
@@ -29,17 +30,13 @@
|
|||||||
BootManagerWindow::BootManagerWindow()
|
BootManagerWindow::BootManagerWindow()
|
||||||
:
|
:
|
||||||
BWindow(BRect(100, 100, 500, 400), B_TRANSLATE_SYSTEM_NAME("BootManager"),
|
BWindow(BRect(100, 100, 500, 400), B_TRANSLATE_SYSTEM_NAME("BootManager"),
|
||||||
B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE
|
B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE)
|
||||||
| B_AUTO_UPDATE_SIZE_LIMITS)
|
|
||||||
{
|
{
|
||||||
float minWidth, maxWidth, minHeight, maxHeight;
|
float minWidth, maxWidth, minHeight, maxHeight;
|
||||||
GetSizeLimits(&minWidth, &maxWidth, &minHeight, &maxHeight);
|
GetSizeLimits(&minWidth, &maxWidth, &minHeight, &maxHeight);
|
||||||
|
|
||||||
// Use font to determine necessary size of window:
|
minWidth = be_control_look->DefaultLabelSpacing() * 67.0f;
|
||||||
const BFont* font = be_plain_font;
|
minHeight = be_control_look->DefaultLabelSpacing() * 42.0f;
|
||||||
minWidth = 400 * (double)font->Size() / 12.0f;
|
|
||||||
minHeight = 250 * (double)font->Size() / 12.0f;
|
|
||||||
|
|
||||||
SetSizeLimits(minWidth, maxWidth, minHeight, maxHeight);
|
SetSizeLimits(minWidth, maxWidth, minHeight, maxHeight);
|
||||||
|
|
||||||
fWizardView = new WizardView("wizard");
|
fWizardView = new WizardView("wizard");
|
||||||
|
|||||||
Reference in New Issue
Block a user