keystore_server: Resize request windows to preferred size.

Long application signatures and paths could previously take up too much
space, causing the buttons to be cut off or become completely invisible.

Actually fixes #11367.
This commit is contained in:
Michael Lotz 2015-08-29 10:04:12 +02:00
parent e10d416e69
commit b92e2c086f
2 changed files with 4 additions and 2 deletions

View File

@ -142,7 +142,7 @@ AppAccessRequestWindow::AppAccessRequestWindow(const char* keyringName,
const char* signature, const char* path, const char* accessString,
bool appIsNew, bool appWasUpdated)
:
BWindow(BRect(50, 50, 269, 302), B_TRANSLATE("Application keyring access"),
BWindow(BRect(50, 50, 100, 100), B_TRANSLATE("Application keyring access"),
B_TITLED_WINDOW, B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS
| B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE | B_AUTO_UPDATE_SIZE_LIMITS),
fRequestView(NULL),
@ -208,6 +208,7 @@ AppAccessRequestWindow::MessageReceived(BMessage* message)
status_t
AppAccessRequestWindow::RequestAppAccess(bool& allowAlways)
{
ResizeToPreferred();
CenterOnScreen();
Show();

View File

@ -152,7 +152,7 @@ private:
KeyRequestWindow::KeyRequestWindow()
:
BWindow(BRect(50, 50, 269, 302), B_TRANSLATE("Unlock keyring"),
BWindow(BRect(50, 50, 100, 100), B_TRANSLATE("Unlock keyring"),
B_TITLED_WINDOW, B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS
| B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE | B_AUTO_UPDATE_SIZE_LIMITS),
fRequestView(NULL),
@ -218,6 +218,7 @@ KeyRequestWindow::RequestKey(const BString& keyringName, BMessage& keyMessage)
{
fRequestView->SetUp(keyringName);
ResizeToPreferred();
CenterOnScreen();
Show();