Various minor layout tweaks/improvements to prompt window.

This commit is contained in:
Rene Gollent
2013-05-04 20:30:04 -04:00
parent c162f52eaa
commit 309f473c0f
+8 -3
View File
@@ -30,21 +30,26 @@ PromptWindow::PromptWindow(const char* title, const char* label,
BButton* acceptButton = new BButton("Accept", new
BMessage(kAcceptInput));
BLayoutBuilder::Group<>(this, B_VERTICAL)
.SetInsets(4.0f, 4.0f, 4.0f, 4.0f)
.Add(fInfoView)
.Add(fTextControl)
.AddGroup(B_HORIZONTAL)
.AddGlue()
.Add(cancelButton)
.Add(acceptButton)
.Add(cancelButton);
.End()
.End();
if (info == NULL)
fInfoView->Hide();
fTextControl->TextView()->SetExplicitMinSize(BSize(
fTextControl->TextView()->StringWidth("1234567890"), B_SIZE_UNSET));
fTextControl->TextView()->SetExplicitMinSize(BSize(200.0, B_SIZE_UNSET));
fTextControl->SetTarget(this);
acceptButton->SetTarget(this);
cancelButton->SetTarget(this);
fTextControl->MakeFocus(true);
SetDefaultButton(acceptButton);
}