OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/style/platform_style.h" | 5 #include "ui/views/style/platform_style.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "ui/base/resource/resource_bundle.h" | 8 #include "ui/base/resource/resource_bundle.h" |
9 #include "ui/gfx/color_utils.h" | 9 #include "ui/gfx/color_utils.h" |
10 #include "ui/gfx/paint_vector_icon.h" | 10 #include "ui/gfx/paint_vector_icon.h" |
11 #include "ui/gfx/vector_icons_public.h" | 11 #include "ui/gfx/vector_icons_public.h" |
12 #include "ui/resources/grit/ui_resources.h" | 12 #include "ui/resources/grit/ui_resources.h" |
13 #include "ui/views/controls/button/label_button.h" | 13 #include "ui/views/controls/button/label_button.h" |
14 #import "ui/views/controls/scrollbar/cocoa_scroll_bar.h" | 14 #import "ui/views/controls/scrollbar/cocoa_scroll_bar.h" |
15 | 15 |
16 #import <Cocoa/Cocoa.h> | 16 #import <Cocoa/Cocoa.h> |
17 | 17 |
18 namespace views { | 18 namespace views { |
19 | 19 |
20 const int PlatformStyle::kComboboxNormalArrowPadding = 0; | 20 const int PlatformStyle::kComboboxNormalArrowPadding = 0; |
21 const int PlatformStyle::kMinLabelButtonWidth = 32; | 21 const int PlatformStyle::kMinLabelButtonWidth = 32; |
22 const int PlatformStyle::kMinLabelButtonHeight = 30; | 22 const int PlatformStyle::kMinLabelButtonHeight = 30; |
23 const bool PlatformStyle::kDefaultLabelButtonHasBoldFont = false; | 23 const bool PlatformStyle::kDefaultLabelButtonHasBoldFont = false; |
24 const bool PlatformStyle::kDialogDefaultButtonCanBeCancel = false; | 24 const bool PlatformStyle::kDialogDefaultButtonCanBeCancel = false; |
25 const bool PlatformStyle::kTextDragVerticallyDragsToEnd = true; | |
26 const bool PlatformStyle::kTreeViewHasFocusRing = true; | 25 const bool PlatformStyle::kTreeViewHasFocusRing = true; |
27 const bool PlatformStyle::kTreeViewSelectionPaintsEntireRow = true; | 26 const bool PlatformStyle::kTreeViewSelectionPaintsEntireRow = true; |
28 const bool PlatformStyle::kUseRipples = false; | 27 const bool PlatformStyle::kUseRipples = false; |
29 | 28 |
30 const CustomButton::NotifyAction PlatformStyle::kMenuNotifyActivationAction = | 29 const CustomButton::NotifyAction PlatformStyle::kMenuNotifyActivationAction = |
31 CustomButton::NOTIFY_ON_PRESS; | 30 CustomButton::NOTIFY_ON_PRESS; |
32 | 31 |
33 // static | 32 // static |
34 gfx::ImageSkia PlatformStyle::CreateComboboxArrow(bool is_enabled, | 33 gfx::ImageSkia PlatformStyle::CreateComboboxArrow(bool is_enabled, |
35 Combobox::Style style) { | 34 Combobox::Style style) { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 ButtonColorByState& colors = *color_by_state; | 70 ButtonColorByState& colors = *color_by_state; |
72 colors[Button::STATE_PRESSED] = SK_ColorWHITE; | 71 colors[Button::STATE_PRESSED] = SK_ColorWHITE; |
73 } | 72 } |
74 | 73 |
75 // static | 74 // static |
76 void PlatformStyle::OnTextfieldEditFailed() { | 75 void PlatformStyle::OnTextfieldEditFailed() { |
77 NSBeep(); | 76 NSBeep(); |
78 } | 77 } |
79 | 78 |
80 } // namespace views | 79 } // namespace views |
OLD | NEW |