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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_CallToActionColor) |
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::NORMAL; | 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(); |
285 title()->SetFontList(rb.GetFontListWithDelta(ui::kLabelFontSizeDelta, | 285 title()->SetFontList(rb.GetFontListWithDelta(ui::kLabelFontSizeDelta, |
286 gfx::Font::NORMAL, font_weight)); | 286 gfx::Font::NORMAL, font_weight)); |
287 } | 287 } |
288 | 288 |
(...skipping 230 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 |