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

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

Issue 341045: Fix up extension badge text drawing.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 }; 102 };
103 103
104 FirstRunBubbleView::FirstRunBubbleView(FirstRunBubble* bubble_window, 104 FirstRunBubbleView::FirstRunBubbleView(FirstRunBubble* bubble_window,
105 Profile* profile) 105 Profile* profile)
106 : bubble_window_(bubble_window), 106 : bubble_window_(bubble_window),
107 label1_(NULL), 107 label1_(NULL),
108 label2_(NULL), 108 label2_(NULL),
109 label3_(NULL), 109 label3_(NULL),
110 keep_button_(NULL), 110 keep_button_(NULL),
111 change_button_(NULL) { 111 change_button_(NULL) {
112 gfx::Font& font = 112 const gfx::Font& font =
113 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::MediumFont); 113 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::MediumFont);
114 114
115 label1_ = new views::Label(l10n_util::GetString(IDS_FR_BUBBLE_TITLE)); 115 label1_ = new views::Label(l10n_util::GetString(IDS_FR_BUBBLE_TITLE));
116 label1_->SetFont(font.DeriveFont(3, gfx::Font::BOLD)); 116 label1_->SetFont(font.DeriveFont(3, gfx::Font::BOLD));
117 label1_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 117 label1_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
118 AddChildView(label1_); 118 AddChildView(label1_);
119 119
120 gfx::Size ps = GetPreferredSize(); 120 gfx::Size ps = GetPreferredSize();
121 121
122 label2_ = new views::Label(l10n_util::GetString(IDS_FR_BUBBLE_SUBTEXT)); 122 label2_ = new views::Label(l10n_util::GetString(IDS_FR_BUBBLE_SUBTEXT));
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 }; 254 };
255 255
256 FirstRunOEMBubbleView::FirstRunOEMBubbleView(FirstRunBubble* bubble_window, 256 FirstRunOEMBubbleView::FirstRunOEMBubbleView(FirstRunBubble* bubble_window,
257 Profile* profile) 257 Profile* profile)
258 : bubble_window_(bubble_window), 258 : bubble_window_(bubble_window),
259 label1_(NULL), 259 label1_(NULL),
260 label2_(NULL), 260 label2_(NULL),
261 label3_(NULL), 261 label3_(NULL),
262 close_button_(NULL) { 262 close_button_(NULL) {
263 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 263 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
264 gfx::Font& font = rb.GetFont(ResourceBundle::MediumFont); 264 const gfx::Font& font = rb.GetFont(ResourceBundle::MediumFont);
265 265
266 label1_ = new views::Label(l10n_util::GetString(IDS_FR_OEM_BUBBLE_TITLE_1)); 266 label1_ = new views::Label(l10n_util::GetString(IDS_FR_OEM_BUBBLE_TITLE_1));
267 label1_->SetFont(font.DeriveFont(3, gfx::Font::BOLD)); 267 label1_->SetFont(font.DeriveFont(3, gfx::Font::BOLD));
268 label1_->SetColor(SK_ColorRED); 268 label1_->SetColor(SK_ColorRED);
269 label1_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 269 label1_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
270 AddChildView(label1_); 270 AddChildView(label1_);
271 271
272 label2_ = new views::Label(l10n_util::GetString(IDS_FR_OEM_BUBBLE_TITLE_2)); 272 label2_ = new views::Label(l10n_util::GetString(IDS_FR_OEM_BUBBLE_TITLE_2));
273 label2_->SetFont(font.DeriveFont(3, gfx::Font::BOLD)); 273 label2_->SetFont(font.DeriveFont(3, gfx::Font::BOLD));
274 label2_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 274 label2_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 } 408 }
409 409
410 void FirstRunBubble::InfoBubbleClosing(InfoBubble* info_bubble, 410 void FirstRunBubble::InfoBubbleClosing(InfoBubble* info_bubble,
411 bool closed_by_escape) { 411 bool closed_by_escape) {
412 // Make sure our parent window is re-enabled. 412 // Make sure our parent window is re-enabled.
413 if (!IsWindowEnabled(GetParent())) 413 if (!IsWindowEnabled(GetParent()))
414 ::EnableWindow(GetParent(), true); 414 ::EnableWindow(GetParent(), true);
415 enable_window_method_factory_.RevokeAll(); 415 enable_window_method_factory_.RevokeAll();
416 GetFocusManager()->RemoveFocusChangeListener(view_); 416 GetFocusManager()->RemoveFocusChangeListener(view_);
417 } 417 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/tabs/tab_renderer_gtk.cc ('k') | chrome/browser/views/options/languages_page_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698