From 309f473c0fba22e96964b3f4e80c78a540f5efb7 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Sat, 4 May 2013 20:17:48 -0400 Subject: [PATCH] Various minor layout tweaks/improvements to prompt window. --- src/kits/shared/PromptWindow.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/kits/shared/PromptWindow.cpp b/src/kits/shared/PromptWindow.cpp index 53ce2f0956..4eeac83ab1 100644 --- a/src/kits/shared/PromptWindow.cpp +++ b/src/kits/shared/PromptWindow.cpp @@ -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); }