Make the Installer status view a little wider by default and also resize it's
height if needed. This should prevent any text from being cut off (though to be fair it is possible to resize the window horizontally to see any cut off text.) Fixes #5882. +alpha3 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42022 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
7802e2dd2c
commit
693ecccc82
@ -176,9 +176,16 @@ InstallerWindow::InstallerWindow()
|
|||||||
|
|
||||||
BSize logoSize = logoView->MinSize();
|
BSize logoSize = logoView->MinSize();
|
||||||
logoView->SetExplicitMaxSize(logoSize);
|
logoView->SetExplicitMaxSize(logoSize);
|
||||||
fStatusView->SetExplicitMinSize(BSize(logoSize.width * 0.66,
|
fStatusView->SetExplicitMinSize(BSize(logoSize.width * 0.8,
|
||||||
B_SIZE_UNSET));
|
B_SIZE_UNSET));
|
||||||
|
|
||||||
|
// Explicitly create group view to set the background white in case
|
||||||
|
// height resizing is needed for the status view
|
||||||
|
BGroupView* logoGroup = new BGroupView(B_HORIZONTAL, 0);
|
||||||
|
logoGroup->SetViewColor(255, 255, 255);
|
||||||
|
logoGroup->AddChild(logoView);
|
||||||
|
logoGroup->AddChild(fStatusView);
|
||||||
|
|
||||||
fDestMenu = new BPopUpMenu(B_TRANSLATE("scanning" B_UTF8_ELLIPSIS),
|
fDestMenu = new BPopUpMenu(B_TRANSLATE("scanning" B_UTF8_ELLIPSIS),
|
||||||
true, false);
|
true, false);
|
||||||
fSrcMenu = new BPopUpMenu(B_TRANSLATE("scanning" B_UTF8_ELLIPSIS),
|
fSrcMenu = new BPopUpMenu(B_TRANSLATE("scanning" B_UTF8_ELLIPSIS),
|
||||||
@ -244,10 +251,7 @@ InstallerWindow::InstallerWindow()
|
|||||||
SetLayout(new BGroupLayout(B_HORIZONTAL));
|
SetLayout(new BGroupLayout(B_HORIZONTAL));
|
||||||
AddChild(BGroupLayoutBuilder(B_VERTICAL, 0)
|
AddChild(BGroupLayoutBuilder(B_VERTICAL, 0)
|
||||||
.Add(mainMenu)
|
.Add(mainMenu)
|
||||||
.Add(BGroupLayoutBuilder(B_HORIZONTAL, 0)
|
.Add(logoGroup)
|
||||||
.Add(logoView)
|
|
||||||
.Add(fStatusView)
|
|
||||||
)
|
|
||||||
.Add(new BSeparatorView(B_HORIZONTAL, B_PLAIN_BORDER))
|
.Add(new BSeparatorView(B_HORIZONTAL, B_PLAIN_BORDER))
|
||||||
.Add(BGroupLayoutBuilder(B_VERTICAL, spacing)
|
.Add(BGroupLayoutBuilder(B_VERTICAL, spacing)
|
||||||
.Add(BGridLayoutBuilder(0, spacing)
|
.Add(BGridLayoutBuilder(0, spacing)
|
||||||
@ -843,6 +847,12 @@ void
|
|||||||
InstallerWindow::_SetStatusMessage(const char *text)
|
InstallerWindow::_SetStatusMessage(const char *text)
|
||||||
{
|
{
|
||||||
fStatusView->SetText(text);
|
fStatusView->SetText(text);
|
||||||
|
|
||||||
|
// Make the status view taller if needed
|
||||||
|
BSize size = fStatusView->ExplicitMinSize();
|
||||||
|
float heightNeeded = fStatusView->TextHeight(0, fStatusView->CountLines()) + 15.0;
|
||||||
|
if (heightNeeded > size.height)
|
||||||
|
fStatusView->SetExplicitMinSize(BSize(size.width, heightNeeded));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user