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

Side by Side Diff: chrome/browser/views/first_run_bubble.cc

Issue 113441: ChromeFont->gfx::Font... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Created 11 years, 7 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/views/first_run_bubble.h" 5 #include "chrome/browser/views/first_run_bubble.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/win_util.h" 9 #include "base/win_util.h"
10 #include "chrome/browser/browser.h" 10 #include "chrome/browser/browser.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 public views::ButtonListener, 53 public views::ButtonListener,
54 public views::FocusChangeListener { 54 public views::FocusChangeListener {
55 public: 55 public:
56 FirstRunBubbleView(FirstRunBubble* bubble_window, Profile* profile) 56 FirstRunBubbleView(FirstRunBubble* bubble_window, Profile* profile)
57 : bubble_window_(bubble_window), 57 : bubble_window_(bubble_window),
58 label1_(NULL), 58 label1_(NULL),
59 label2_(NULL), 59 label2_(NULL),
60 label3_(NULL), 60 label3_(NULL),
61 keep_button_(NULL), 61 keep_button_(NULL),
62 change_button_(NULL) { 62 change_button_(NULL) {
63 ChromeFont& font = 63 gfx::Font& font =
64 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::MediumFont); 64 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::MediumFont);
65 65
66 label1_ = new views::Label(l10n_util::GetString(IDS_FR_BUBBLE_TITLE)); 66 label1_ = new views::Label(l10n_util::GetString(IDS_FR_BUBBLE_TITLE));
67 label1_->SetFont(font.DeriveFont(3, ChromeFont::BOLD)); 67 label1_->SetFont(font.DeriveFont(3, gfx::Font::BOLD));
68 label1_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 68 label1_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
69 AddChildView(label1_); 69 AddChildView(label1_);
70 70
71 gfx::Size ps = GetPreferredSize(); 71 gfx::Size ps = GetPreferredSize();
72 72
73 label2_ = new views::Label(l10n_util::GetString(IDS_FR_BUBBLE_SUBTEXT)); 73 label2_ = new views::Label(l10n_util::GetString(IDS_FR_BUBBLE_SUBTEXT));
74 label2_->SetMultiLine(true); 74 label2_->SetMultiLine(true);
75 label2_->SetFont(font); 75 label2_->SetFont(font);
76 label2_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 76 label2_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
77 label2_->SizeToFit(ps.width() - kBubblePadding * 2); 77 label2_->SizeToFit(ps.width() - kBubblePadding * 2);
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 views::FocusManager* focus_manager = 236 views::FocusManager* focus_manager =
237 views::FocusManager::GetFocusManager(window->GetNativeView()); 237 views::FocusManager::GetFocusManager(window->GetNativeView());
238 focus_manager->AddFocusChangeListener(view); 238 focus_manager->AddFocusChangeListener(view);
239 view->BubbleShown(); 239 view->BubbleShown();
240 return window; 240 return window;
241 } 241 }
242 242
243 void FirstRunBubble::EnableParent() { 243 void FirstRunBubble::EnableParent() {
244 ::EnableWindow(GetParent(), true); 244 ::EnableWindow(GetParent(), true);
245 } 245 }
OLDNEW
« no previous file with comments | « chrome/browser/views/download_item_view.h ('k') | chrome/browser/views/frame/opaque_browser_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698