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: chrome/browser/ui/views/accessibility/invert_bubble_view.cc

Issue 1819753003: Allow various font weights in gfx. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a lost comment and modify a render text unittest to not test black because of test env font con… Created 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/views/accessibility/invert_bubble_view.h" 5 #include "chrome/browser/ui/views/accessibility/invert_bubble_view.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/views/frame/browser_view.h" 10 #include "chrome/browser/ui/views/frame/browser_view.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 int InvertBubbleView::GetDialogButtons() const { 76 int InvertBubbleView::GetDialogButtons() const {
77 return ui::DIALOG_BUTTON_NONE; 77 return ui::DIALOG_BUTTON_NONE;
78 } 78 }
79 79
80 void InvertBubbleView::Init() { 80 void InvertBubbleView::Init() {
81 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 81 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
82 const gfx::FontList& original_font_list = 82 const gfx::FontList& original_font_list =
83 rb.GetFontList(ui::ResourceBundle::MediumFont); 83 rb.GetFontList(ui::ResourceBundle::MediumFont);
84 84
85 views::Label* title = new views::Label( 85 views::Label* title = new views::Label(
86 base::string16(), original_font_list.Derive(2, gfx::Font::BOLD)); 86 base::string16(),
87 original_font_list.Derive(2, gfx::Font::NORMAL, gfx::Font::Weight::BOLD));
87 title->SetMultiLine(true); 88 title->SetMultiLine(true);
88 89
89 learn_more_ = new views::Link(l10n_util::GetStringUTF16(IDS_LEARN_MORE)); 90 learn_more_ = new views::Link(l10n_util::GetStringUTF16(IDS_LEARN_MORE));
90 learn_more_->SetFontList(original_font_list); 91 learn_more_->SetFontList(original_font_list);
91 learn_more_->set_listener(this); 92 learn_more_->set_listener(this);
92 93
93 high_contrast_ = 94 high_contrast_ =
94 new views::Link(l10n_util::GetStringUTF16(IDS_HIGH_CONTRAST_EXT)); 95 new views::Link(l10n_util::GetStringUTF16(IDS_HIGH_CONTRAST_EXT));
95 high_contrast_->SetFontList(original_font_list); 96 high_contrast_->SetFontList(original_font_list);
96 high_contrast_->set_listener(this); 97 high_contrast_->set_listener(this);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 views::View* anchor = browser_view->toolbar()->app_menu_button(); 169 views::View* anchor = browser_view->toolbar()->app_menu_button();
169 if (color_utils::IsInvertedColorScheme() && anchor && anchor->GetWidget() && 170 if (color_utils::IsInvertedColorScheme() && anchor && anchor->GetWidget() &&
170 !pref_service->GetBoolean(prefs::kInvertNotificationShown)) { 171 !pref_service->GetBoolean(prefs::kInvertNotificationShown)) {
171 pref_service->SetBoolean(prefs::kInvertNotificationShown, true); 172 pref_service->SetBoolean(prefs::kInvertNotificationShown, true);
172 InvertBubbleView* delegate = new InvertBubbleView(browser, anchor); 173 InvertBubbleView* delegate = new InvertBubbleView(browser, anchor);
173 views::BubbleDialogDelegateView::CreateBubble(delegate)->Show(); 174 views::BubbleDialogDelegateView::CreateBubble(delegate)->Show();
174 } 175 }
175 } 176 }
176 177
177 } // namespace chrome 178 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_ui.cc ('k') | chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698