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

Side by Side Diff: ui/app_list/views/signin_view.cc

Issue 14631022: Add support for blue buttons. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/resources/ui_resources.grd » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/app_list/views/signin_view.h" 5 #include "ui/app_list/views/signin_view.h"
6 6
7 #include "ui/app_list/signin_delegate.h" 7 #include "ui/app_list/signin_delegate.h"
8 #include "ui/base/resource/resource_bundle.h" 8 #include "ui/base/resource/resource_bundle.h"
9 #include "ui/gfx/font.h" 9 #include "ui/gfx/font.h"
10 #include "ui/views/background.h" 10 #include "ui/views/background.h"
11 #include "ui/views/controls/button/label_button.h" 11 #include "ui/views/controls/button/blue_button.h"
12 #include "ui/views/controls/label.h" 12 #include "ui/views/controls/label.h"
13 #include "ui/views/controls/link.h" 13 #include "ui/views/controls/link.h"
14 #include "ui/views/layout/grid_layout.h" 14 #include "ui/views/layout/grid_layout.h"
15 15
16 namespace { 16 namespace {
17 17
18 const int kTopPadding = 40; 18 const int kTopPadding = 40;
19 const int kBottomPadding = 40; 19 const int kBottomPadding = 40;
20 const int kLeftPadding = 40; 20 const int kLeftPadding = 40;
21 const int kRightPadding = 40; 21 const int kRightPadding = 40;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 layout->AddView(heading); 75 layout->AddView(heading);
76 76
77 views::Label* text = new views::Label(delegate_->GetSigninText()); 77 views::Label* text = new views::Label(delegate_->GetSigninText());
78 text->SetFont(*text_font_); 78 text->SetFont(*text_font_);
79 text->SetMultiLine(true); 79 text->SetMultiLine(true);
80 text->SetHorizontalAlignment(gfx::ALIGN_LEFT); 80 text->SetHorizontalAlignment(gfx::ALIGN_LEFT);
81 layout->StartRowWithPadding(0, kNormalSetId, 0, 81 layout->StartRowWithPadding(0, kNormalSetId, 0,
82 kHeadingPadding - title_descender); 82 kHeadingPadding - title_descender);
83 layout->AddView(text); 83 layout->AddView(text);
84 84
85 views::LabelButton* signin_button = new views::LabelButton( 85 views::BlueButton* signin_button = new views::BlueButton(
86 this, 86 this,
87 delegate_->GetSigninButtonText()); 87 delegate_->GetSigninButtonText());
88 signin_button->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON); 88 signin_button->SetFont(*button_font_);
89 layout->StartRowWithPadding(0, kButtonSetId, 0, 89 layout->StartRowWithPadding(0, kButtonSetId, 0,
90 kButtonPadding - text_descender); 90 kButtonPadding - text_descender);
91 layout->AddView(signin_button); 91 layout->AddView(signin_button);
92 92
93 layout->StartRow(1, kNormalSetId); 93 layout->StartRow(1, kNormalSetId);
94 learn_more_link_ = new views::Link(delegate_->GetLearnMoreLinkText()); 94 learn_more_link_ = new views::Link(delegate_->GetLearnMoreLinkText());
95 learn_more_link_->set_listener(this); 95 learn_more_link_->set_listener(this);
96 learn_more_link_->SetFont(*text_font_); 96 learn_more_link_->SetFont(*text_font_);
97 learn_more_link_->SetUnderline(false); 97 learn_more_link_->SetUnderline(false);
98 layout->AddView(learn_more_link_, 98 layout->AddView(learn_more_link_,
(...skipping 27 matching lines...) Expand all
126 if (source == learn_more_link_) 126 if (source == learn_more_link_)
127 delegate_->OpenLearnMore(); 127 delegate_->OpenLearnMore();
128 else if (source == settings_link_) 128 else if (source == settings_link_)
129 delegate_->OpenSettings(); 129 delegate_->OpenSettings();
130 else 130 else
131 NOTREACHED(); 131 NOTREACHED();
132 } 132 }
133 } 133 }
134 134
135 } // namespace app_list 135 } // namespace app_list
OLDNEW
« no previous file with comments | « no previous file | ui/resources/ui_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698