Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2367)

Unified Diff: chrome/browser/ui/views/profile_chooser_view.cc

Issue 210153004: Beautify the gaia signin view (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/profile_chooser_view.cc
diff --git a/chrome/browser/ui/views/profile_chooser_view.cc b/chrome/browser/ui/views/profile_chooser_view.cc
index 4252bd299bfe010536cbcb4f54e749a65e474a4b..0bea3c92232971b29d688a23c561925ac8a9b4a8 100644
--- a/chrome/browser/ui/views/profile_chooser_view.cc
+++ b/chrome/browser/ui/views/profile_chooser_view.cc
@@ -309,6 +309,9 @@ class TitleCard : public views::View {
title_label_ = new views::Label(l10n_util::GetStringUTF16(message_id));
title_label_->SetHorizontalAlignment(gfx::ALIGN_CENTER);
+ const gfx::FontList& medium_font_list =
+ rb->GetFontList(ui::ResourceBundle::MediumFont);
+ title_label_->SetFontList(medium_font_list);
AddChildView(back_button_);
AddChildView(title_label_);
@@ -1024,20 +1027,27 @@ void ProfileChooserView::CreateAccountButton(views::GridLayout* layout,
views::View* ProfileChooserView::CreateGaiaSigninView(
bool add_secondary_account) {
views::View* view = new views::View();
- int available_width = kFixedGaiaViewWidth - 2 * views::kButtonHEdgeMarginNew;
- views::GridLayout* layout = CreateSingleColumnLayout(view, available_width);
- layout->SetInsets(views::kButtonVEdgeMarginNew,
- views::kButtonHEdgeMarginNew,
- views::kButtonVEdgeMarginNew,
- views::kButtonHEdgeMarginNew);
+ views::GridLayout* layout =
+ CreateSingleColumnLayout(view, kFixedGaiaViewWidth);
// Adds title.
- layout->StartRow(1, 0);
- layout->AddView(new TitleCard(
+ views::View* padded_title = new views::View();
+ int available_width = kFixedGaiaViewWidth - 2 * views::kButtonHEdgeMarginNew;
+ views::GridLayout* padded_layout = CreateSingleColumnLayout(
+ padded_title, available_width);
+ padded_layout->SetInsets(views::kButtonVEdgeMarginNew,
+ views::kButtonHEdgeMarginNew,
+ views::kButtonVEdgeMarginNew,
+ views::kButtonHEdgeMarginNew);
+ padded_layout->StartRow(1, 0);
+ padded_layout->AddView(new TitleCard(
add_secondary_account ? IDS_PROFILES_GAIA_ADD_ACCOUNT_TITLE :
IDS_PROFILES_GAIA_SIGNIN_TITLE,
this, &gaia_signin_cancel_button_));
- layout->StartRowWithPadding(1, 0, 0, views::kRelatedControlVerticalSpacing);
+
+ layout->StartRow(1, 0);
+ layout->AddView(padded_title);
+ layout->StartRow(1, 0);
layout->AddView(new views::Separator(views::Separator::HORIZONTAL));
// Adds Gaia signin webview
@@ -1049,11 +1059,12 @@ views::View* ProfileChooserView::CreateGaiaSigninView(
GURL url(signin::GetPromoURL(
source, false /* auto_close */, true /* is_constrained */));
web_view->LoadInitialURL(url);
- web_view->SetPreferredSize(gfx::Size(available_width, kFixedGaiaViewHeight));
+ web_view->SetPreferredSize(
+ gfx::Size(kFixedGaiaViewWidth, kFixedGaiaViewHeight));
layout->StartRow(1, 0);
layout->AddView(web_view);
- layout->StartRowWithPadding(1, 0, 0, views::kRelatedControlVerticalSpacing);
+
return view;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698