From cbdd5aff176eb863edcf21b0784391b1d51f093a Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sun, 24 Jun 2012 15:32:31 +0200 Subject: [PATCH] Restyle the app access request dialog to make it less horrible. --- .../keystore/AppAccessRequestWindow.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/servers/keystore/AppAccessRequestWindow.cpp b/src/servers/keystore/AppAccessRequestWindow.cpp index b7ce8b625e..d4fb25f7fa 100644 --- a/src/servers/keystore/AppAccessRequestWindow.cpp +++ b/src/servers/keystore/AppAccessRequestWindow.cpp @@ -52,8 +52,11 @@ public: return; BString details; - details << "The application\n" << signature << " (" << path << ")\n" - << "requests access to keyring\n" << keyringName << "\n"; + details << "The application:\n\n" + << signature << " (" << path << ")\n\n" + << "requests access to keyring:\n\n" + << keyringName << "\n\n"; + if (appIsNew) details << "This application hasn't been granted access before."; else if (appWasUpdated) { @@ -61,10 +64,20 @@ public: << " granted access."; } else { details << "This application doesn't yet have the required" - " priviledges."; + " privileges."; } message->SetText(details); + message->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); + rgb_color textColor = ui_color(B_PANEL_TEXT_COLOR); + message->SetFontAndColor(be_plain_font, B_FONT_ALL, &textColor); + message->MakeEditable(false); + message->MakeSelectable(false); + message->SetWordWrap(true); + + message->SetExplicitMinSize(BSize(message->StringWidth( + "01234567890123456789012345678901234567890123456789") + inset, + B_SIZE_UNSET)); BGroupView* buttons = new(std::nothrow) BGroupView(B_HORIZONTAL); if (buttons == NULL)