diff options
author | dconnelly@chromium.org <dconnelly@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-14 20:09:06 +0000 |
---|---|---|
committer | dconnelly@chromium.org <dconnelly@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-14 20:09:06 +0000 |
commit | 0b07cec5ac1381ced1f5b873866131ca99216db1 (patch) | |
tree | 40ac3af4c63241156382d3998c289286856a454f | |
parent | ff2a58fb99d4f97a046bd69a80ae2a7f8d293c28 (diff) | |
download | chromium_src-0b07cec5ac1381ced1f5b873866131ca99216db1.zip chromium_src-0b07cec5ac1381ced1f5b873866131ca99216db1.tar.gz chromium_src-0b07cec5ac1381ced1f5b873866131ca99216db1.tar.bz2 |
Short-term enterprise sign-in confirmation dialog style changes.
- make the box large enough on Linux
- remove the redundant dialog title on Windows
- shrink the dialog title font size
You can check out screenshots on the bug tracker:
http://crbug.com/176920
BUG=176920
Review URL: https://chromiumcodereview.appspot.com/12611015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188169 0039d316-1c4b-4281-b951-d872f2087c98
6 files changed, 37 insertions, 2 deletions
diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd index 74a0b9f..efcdf9f 100644 --- a/chrome/browser/browser_resources.grd +++ b/chrome/browser/browser_resources.grd @@ -327,6 +327,7 @@ <include name="IDR_MANAGED_USER_PASSPHRASE_DIALOG_JS" file="resources\managed_user_passphrase_dialog.js" type="BINDATA" /> <include name="IDR_PROFILE_SIGNIN_CONFIRMATION_HTML" file="resources\profile_signin_confirmation.html" type="BINDATA" /> <include name="IDR_PROFILE_SIGNIN_CONFIRMATION_JS" file="resources\profile_signin_confirmation.js" type="BINDATA" /> + <include name="IDR_PROFILE_SIGNIN_CONFIRMATION_CSS" file="resources\profile_signin_confirmation.css" type="BINDATA" /> </includes> </release> </grit> diff --git a/chrome/browser/resources/profile_signin_confirmation.css b/chrome/browser/resources/profile_signin_confirmation.css new file mode 100644 index 0000000..8257645 --- /dev/null +++ b/chrome/browser/resources/profile_signin_confirmation.css @@ -0,0 +1,21 @@ +/* Copyright 2013 The Chromium Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. */ + +#button-row { + bottom: 1em; + margin-left: 0; + margin-right: 0; + position: absolute; + text-align: start; + width: 95%; +} + +#button-row button { + margin-left: 0; + margin-right: 0; +} + +#dialog-title { + font-size: 1.3em; +} diff --git a/chrome/browser/resources/profile_signin_confirmation.html b/chrome/browser/resources/profile_signin_confirmation.html index fab9f39..c2097f0 100644 --- a/chrome/browser/resources/profile_signin_confirmation.html +++ b/chrome/browser/resources/profile_signin_confirmation.html @@ -8,9 +8,10 @@ <script src="chrome://resources/js/util.js"></script> <script src="strings.js"></script> <script src="profile_signin_confirmation.js"></script> + <link rel="stylesheet" href="profile_signin_confirmation.css"> </head> <body i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize"> - <h1 i18n-content="dialogTitle"></h1> + <h1 id="dialog-title" i18n-content="dialogTitle"></h1> <p id="dialog-message"></p> <a i18n-content="learnMoreText" href="http://support.google.com/chromeos/bin/answer.py?hl=en&answer=1331549" diff --git a/chrome/browser/resources/profile_signin_confirmation.js b/chrome/browser/resources/profile_signin_confirmation.js index 98174d8..6591fac 100644 --- a/chrome/browser/resources/profile_signin_confirmation.js +++ b/chrome/browser/resources/profile_signin_confirmation.js @@ -32,6 +32,9 @@ cr.define('profile_signin_confirmation', function() { // Right-align the buttons when only "OK" and "Cancel" are showing. $('button-row').style['text-align'] = 'end'; } + + if (args.hideTitle) + $('dialog-title').hidden = true; } return { diff --git a/chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.cc b/chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.cc index 8c6acdb..ea232d3 100644 --- a/chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.cc +++ b/chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.cc @@ -254,7 +254,11 @@ void ProfileSigninConfirmationDialog::GetWebUIMessageHandlers( void ProfileSigninConfirmationDialog::GetDialogSize(gfx::Size* size) const { const int kMinimumDialogWidth = 480; - const int kMinimumDialogHeight = 260; +#if defined(OS_WIN) + const int kMinimumDialogHeight = 180; +#else + const int kMinimumDialogHeight = 210; +#endif const int kProfileCreationMessageHeight = prompt_for_new_profile_ ? 50 : 0; size->SetSize(kMinimumDialogWidth, kMinimumDialogHeight + kProfileCreationMessageHeight); @@ -265,6 +269,9 @@ std::string ProfileSigninConfirmationDialog::GetDialogArgs() const { DictionaryValue dict; dict.SetString("username", username_); dict.SetBoolean("promptForNewProfile", prompt_for_new_profile_); +#ifdef OS_WIN + dict.SetBoolean("hideTitle", true); +#endif base::JSONWriter::Write(&dict, &data); return data; } diff --git a/chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.cc b/chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.cc index 2fc4fbb..36f16a3 100644 --- a/chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.cc +++ b/chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.cc @@ -49,6 +49,8 @@ ProfileSigninConfirmationUI::ProfileSigninConfirmationUI(content::WebUI* web_ui) html_source->AddResourcePath("profile_signin_confirmation.js", IDR_PROFILE_SIGNIN_CONFIRMATION_JS); + html_source->AddResourcePath("profile_signin_confirmation.css", + IDR_PROFILE_SIGNIN_CONFIRMATION_CSS); html_source->SetDefaultResource(IDR_PROFILE_SIGNIN_CONFIRMATION_HTML); Profile* profile = Profile::FromWebUI(web_ui); |