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

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

Issue 151693004: Clean-up: Replaces obsolete Font/FontList methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced. Created 6 years, 10 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 | « ui/app_list/cocoa/signin_view_controller.mm ('k') | no next file » | 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/gfx/font_list.h" 8 #include "ui/gfx/font_list.h"
9 #include "ui/views/background.h" 9 #include "ui/views/background.h"
10 #include "ui/views/controls/button/blue_button.h" 10 #include "ui/views/controls/button/blue_button.h"
(...skipping 17 matching lines...) Expand all
28 } // namespace 28 } // namespace
29 29
30 namespace app_list { 30 namespace app_list {
31 31
32 SigninView::SigninView(SigninDelegate* delegate, int width) 32 SigninView::SigninView(SigninDelegate* delegate, int width)
33 : delegate_(delegate) { 33 : delegate_(delegate) {
34 if (!delegate_) 34 if (!delegate_)
35 return; 35 return;
36 36
37 const gfx::FontList base_font_list; 37 const gfx::FontList base_font_list;
38 const gfx::FontList& title_font_list = 38 const gfx::FontList& title_font_list = base_font_list.DeriveWithSizeDelta(
39 base_font_list.DeriveFontListWithSizeDelta( 39 kTitleFontSize - base_font_list.GetFontSize());
40 kTitleFontSize - base_font_list.GetFontSize()); 40 const gfx::FontList& text_font_list = base_font_list.DeriveWithSizeDelta(
41 const gfx::FontList& text_font_list = 41 kTextFontSize - base_font_list.GetFontSize());
42 base_font_list.DeriveFontListWithSizeDelta( 42 const gfx::FontList& button_font_list = base_font_list.DeriveWithSizeDelta(
43 kTextFontSize - base_font_list.GetFontSize()); 43 kButtonFontSize - base_font_list.GetFontSize());
44 const gfx::FontList& button_font_list =
45 base_font_list.DeriveFontListWithSizeDelta(
46 kButtonFontSize - base_font_list.GetFontSize());
47 44
48 int title_descender = 45 int title_descender =
49 title_font_list.GetHeight() - title_font_list.GetBaseline(); 46 title_font_list.GetHeight() - title_font_list.GetBaseline();
50 int text_descender = 47 int text_descender =
51 text_font_list.GetHeight() - text_font_list.GetBaseline(); 48 text_font_list.GetHeight() - text_font_list.GetBaseline();
52 49
53 views::GridLayout* layout = new views::GridLayout(this); 50 views::GridLayout* layout = new views::GridLayout(this);
54 layout->SetInsets(kTopPadding, kLeftPadding, kBottomPadding - text_descender, 51 layout->SetInsets(kTopPadding, kLeftPadding, kBottomPadding - text_descender,
55 kRightPadding); 52 kRightPadding);
56 SetLayoutManager(layout); 53 SetLayoutManager(layout);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 if (source == learn_more_link_) 129 if (source == learn_more_link_)
133 delegate_->OpenLearnMore(); 130 delegate_->OpenLearnMore();
134 else if (source == settings_link_) 131 else if (source == settings_link_)
135 delegate_->OpenSettings(); 132 delegate_->OpenSettings();
136 else 133 else
137 NOTREACHED(); 134 NOTREACHED();
138 } 135 }
139 } 136 }
140 137
141 } // namespace app_list 138 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/cocoa/signin_view_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698