| OLD | NEW |
| 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 "third_party/skia/include/core/SkPaint.h" | 9 #include "third_party/skia/include/core/SkPaint.h" |
| 10 #include "third_party/skia/include/core/SkPath.h" | 10 #include "third_party/skia/include/core/SkPath.h" |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 void MdTab::OnStateChanged() { | 264 void MdTab::OnStateChanged() { |
| 265 ui::NativeTheme* theme = GetNativeTheme(); | 265 ui::NativeTheme* theme = GetNativeTheme(); |
| 266 SkColor border_color = theme->GetSystemColor( | 266 SkColor border_color = theme->GetSystemColor( |
| 267 selected() ? ui::NativeTheme::kColorId_FocusedBorderColor | 267 selected() ? ui::NativeTheme::kColorId_FocusedBorderColor |
| 268 : ui::NativeTheme::kColorId_UnfocusedBorderColor); | 268 : ui::NativeTheme::kColorId_UnfocusedBorderColor); |
| 269 int border_thickness = selected() ? 2 : 1; | 269 int border_thickness = selected() ? 2 : 1; |
| 270 SetBorder( | 270 SetBorder( |
| 271 Border::CreateSolidSidedBorder(0, 0, border_thickness, 0, border_color)); | 271 Border::CreateSolidSidedBorder(0, 0, border_thickness, 0, border_color)); |
| 272 | 272 |
| 273 SkColor font_color = selected() | 273 SkColor font_color = selected() |
| 274 ? theme->GetSystemColor(ui::NativeTheme::kColorId_CallToActionColor) | 274 ? theme->GetSystemColor(ui::NativeTheme::kColorId_ProminentButtonColor) |
| 275 : theme->GetSystemColor(ui::NativeTheme::kColorId_ButtonEnabledColor); | 275 : theme->GetSystemColor(ui::NativeTheme::kColorId_ButtonEnabledColor); |
| 276 title()->SetEnabledColor(font_color); | 276 title()->SetEnabledColor(font_color); |
| 277 | 277 |
| 278 gfx::Font::Weight font_weight = gfx::Font::Weight::MEDIUM; | 278 gfx::Font::Weight font_weight = gfx::Font::Weight::MEDIUM; |
| 279 #if defined(OS_WIN) | 279 #if defined(OS_WIN) |
| 280 if (selected()) | 280 if (selected()) |
| 281 font_weight = gfx::Font::Weight::BOLD; | 281 font_weight = gfx::Font::Weight::BOLD; |
| 282 #endif | 282 #endif |
| 283 | 283 |
| 284 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 284 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 selected_tab->NotifyAccessibilityEvent( | 519 selected_tab->NotifyAccessibilityEvent( |
| 520 ui::AX_EVENT_FOCUS, true); | 520 ui::AX_EVENT_FOCUS, true); |
| 521 } | 521 } |
| 522 } | 522 } |
| 523 | 523 |
| 524 void TabbedPane::GetAccessibleState(ui::AXViewState* state) { | 524 void TabbedPane::GetAccessibleState(ui::AXViewState* state) { |
| 525 state->role = ui::AX_ROLE_TAB_LIST; | 525 state->role = ui::AX_ROLE_TAB_LIST; |
| 526 } | 526 } |
| 527 | 527 |
| 528 } // namespace views | 528 } // namespace views |
| OLD | NEW |