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

Side by Side Diff: chrome/browser/chromeos/login/textfield_with_margin.cc

Issue 5338002: [cros] Use WideButton for all screens, increase textfield vmargin on login screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moved ctor empty body to cc Created 10 years, 1 month 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/chromeos/login/textfield_with_margin.h" 5 #include "chrome/browser/chromeos/login/textfield_with_margin.h"
6 6
7 namespace { 7 namespace {
8 8
9 // Holds ratio of the margin to the preferred text height. 9 // Holds ratio of the margin to the preferred text height.
10 const double kTextMarginRate = 0.33; 10 const double kTextMarginRate = 0.33;
11 11
12 // Size of each vertical margin (top, bottom).
13 const int kVerticalMargin = 3;
14
12 } // namespace 15 } // namespace
13 16
14 namespace chromeos { 17 namespace chromeos {
15 18
19 TextfieldWithMargin::TextfieldWithMargin() {
20 }
21
16 void TextfieldWithMargin::Layout() { 22 void TextfieldWithMargin::Layout() {
17 int margin = GetPreferredSize().height() * kTextMarginRate; 23 int margin = GetPreferredSize().height() * kTextMarginRate;
18 SetHorizontalMargins(margin, margin); 24 SetHorizontalMargins(margin, margin);
25 SetVerticalMargins(kVerticalMargin, kVerticalMargin);
19 views::Textfield::Layout(); 26 views::Textfield::Layout();
20 } 27 }
21 28
22 } // namespace chromeos 29 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/textfield_with_margin.h ('k') | views/controls/button/text_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698