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

Side by Side Diff: ui/views/controls/tabbed_pane/tabbed_pane.cc

Issue 2961223002: Rename native theme color constants relating to text on dialog buttons
Patch Set: rebase Created 3 years, 5 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
« no previous file with comments | « ui/views/controls/button/md_text_button.cc ('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 (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 "ui/views/controls/tabbed_pane/tabbed_pane.h" 5 #include "ui/views/controls/tabbed_pane/tabbed_pane.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "cc/paint/paint_flags.h" 9 #include "cc/paint/paint_flags.h"
10 #include "third_party/skia/include/core/SkPath.h" 10 #include "third_party/skia/include/core/SkPath.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 const int kBorderThickness = 2; 274 const int kBorderThickness = 2;
275 SetBorder(CreateEmptyBorder(gfx::Insets(kBorderThickness))); 275 SetBorder(CreateEmptyBorder(gfx::Insets(kBorderThickness)));
276 OnStateChanged(); 276 OnStateChanged();
277 } 277 }
278 278
279 MdTab::~MdTab() {} 279 MdTab::~MdTab() {}
280 280
281 void MdTab::OnStateChanged() { 281 void MdTab::OnStateChanged() {
282 ui::NativeTheme* theme = GetNativeTheme(); 282 ui::NativeTheme* theme = GetNativeTheme();
283 283
284 SkColor font_color = selected() 284 SkColor font_color =
285 ? theme->GetSystemColor(ui::NativeTheme::kColorId_ProminentButtonColor) 285 selected() ? theme->GetSystemColor(
286 : theme->GetSystemColor(ui::NativeTheme::kColorId_ButtonEnabledColor); 286 ui::NativeTheme::kColorId_ProminentButtonColor)
287 : theme->GetSystemColor(
288 ui::NativeTheme::kColorId_TextOnEnabledDialogButton);
287 title()->SetEnabledColor(font_color); 289 title()->SetEnabledColor(font_color);
288 290
289 gfx::Font::Weight font_weight = gfx::Font::Weight::MEDIUM; 291 gfx::Font::Weight font_weight = gfx::Font::Weight::MEDIUM;
290 #if defined(OS_WIN) 292 #if defined(OS_WIN)
291 if (selected()) 293 if (selected())
292 font_weight = gfx::Font::Weight::BOLD; 294 font_weight = gfx::Font::Weight::BOLD;
293 #endif 295 #endif
294 296
295 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 297 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
296 title()->SetFontList(rb.GetFontListWithDelta(ui::kLabelFontSizeDelta, 298 title()->SetFontList(rb.GetFontListWithDelta(ui::kLabelFontSizeDelta,
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 628
627 View* TabbedPane::GetSelectedTabContentView() { 629 View* TabbedPane::GetSelectedTabContentView() {
628 return GetSelectedTab() ? GetSelectedTab()->contents() : nullptr; 630 return GetSelectedTab() ? GetSelectedTab()->contents() : nullptr;
629 } 631 }
630 632
631 void TabbedPane::GetAccessibleNodeData(ui::AXNodeData* node_data) { 633 void TabbedPane::GetAccessibleNodeData(ui::AXNodeData* node_data) {
632 node_data->role = ui::AX_ROLE_TAB_LIST; 634 node_data->role = ui::AX_ROLE_TAB_LIST;
633 } 635 }
634 636
635 } // namespace views 637 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/button/md_text_button.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698