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:53:27 +02:00
parent e10d416e69
commit b92e2c086f
2 changed files with 4 additions and 2 deletions
@@ -142,7 +142,7 @@ AppAccessRequestWindow::AppAccessRequestWindow(const char* keyringName,
const char* signature, const char* path, const char* accessString, const char* signature, const char* path, const char* accessString,
bool appIsNew, bool appWasUpdated) 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_TITLED_WINDOW, B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS
| B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE | B_AUTO_UPDATE_SIZE_LIMITS), | B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE | B_AUTO_UPDATE_SIZE_LIMITS),
fRequestView(NULL), fRequestView(NULL),
@@ -208,6 +208,7 @@ AppAccessRequestWindow::MessageReceived(BMessage* message)
status_t status_t
AppAccessRequestWindow::RequestAppAccess(bool& allowAlways) AppAccessRequestWindow::RequestAppAccess(bool& allowAlways)
{ {
ResizeToPreferred();
CenterOnScreen(); CenterOnScreen();
Show(); Show();
+2 -1
View File
@@ -152,7 +152,7 @@ private:
KeyRequestWindow::KeyRequestWindow() 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_TITLED_WINDOW, B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS
| B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE | B_AUTO_UPDATE_SIZE_LIMITS), | B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE | B_AUTO_UPDATE_SIZE_LIMITS),
fRequestView(NULL), fRequestView(NULL),
@@ -218,6 +218,7 @@ KeyRequestWindow::RequestKey(const BString& keyringName, BMessage& keyMessage)
{ {
fRequestView->SetUp(keyringName); fRequestView->SetUp(keyringName);
ResizeToPreferred();
CenterOnScreen(); CenterOnScreen();
Show(); Show();