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

Side by Side Diff: ui/views/style/platform_style_mac.mm

Issue 2342343003: views: provide feedback when editing fails (Closed)
Patch Set: OnEditFailed -> OnKeypressUnhandled Created 4 years, 3 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/style/platform_style.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 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 #include "ui/views/controls/button/label_button_border.h" 14 #include "ui/views/controls/button/label_button_border.h"
15 #include "ui/views/controls/focusable_rounded_border_mac.h" 15 #include "ui/views/controls/focusable_rounded_border_mac.h"
16 #import "ui/views/controls/scrollbar/cocoa_scroll_bar.h" 16 #import "ui/views/controls/scrollbar/cocoa_scroll_bar.h"
17 #include "ui/views/style/mac/combobox_background_mac.h" 17 #include "ui/views/style/mac/combobox_background_mac.h"
18 #include "ui/views/style/mac/dialog_button_border_mac.h" 18 #include "ui/views/style/mac/dialog_button_border_mac.h"
19 19
20 #import <Cocoa/Cocoa.h>
21
20 namespace views { 22 namespace views {
21 23
22 const int PlatformStyle::kComboboxNormalArrowPadding = 0; 24 const int PlatformStyle::kComboboxNormalArrowPadding = 0;
23 const int PlatformStyle::kMinLabelButtonWidth = 32; 25 const int PlatformStyle::kMinLabelButtonWidth = 32;
24 const int PlatformStyle::kMinLabelButtonHeight = 30; 26 const int PlatformStyle::kMinLabelButtonHeight = 30;
25 const bool PlatformStyle::kDefaultLabelButtonHasBoldFont = false; 27 const bool PlatformStyle::kDefaultLabelButtonHasBoldFont = false;
26 const bool PlatformStyle::kDialogDefaultButtonCanBeCancel = false; 28 const bool PlatformStyle::kDialogDefaultButtonCanBeCancel = false;
27 const bool PlatformStyle::kTextfieldDragVerticallyDragsToEnd = true; 29 const bool PlatformStyle::kTextfieldDragVerticallyDragsToEnd = true;
28 const bool PlatformStyle::kTreeViewSelectionPaintsEntireRow = true; 30 const bool PlatformStyle::kTreeViewSelectionPaintsEntireRow = true;
29 const bool PlatformStyle::kUseRipples = false; 31 const bool PlatformStyle::kUseRipples = false;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // static 91 // static
90 void PlatformStyle::ApplyLabelButtonTextStyle( 92 void PlatformStyle::ApplyLabelButtonTextStyle(
91 views::Label* label, 93 views::Label* label,
92 ButtonColorByState* color_by_state) { 94 ButtonColorByState* color_by_state) {
93 const ui::NativeTheme* theme = label->GetNativeTheme(); 95 const ui::NativeTheme* theme = label->GetNativeTheme();
94 ButtonColorByState& colors = *color_by_state; 96 ButtonColorByState& colors = *color_by_state;
95 colors[Button::STATE_PRESSED] = 97 colors[Button::STATE_PRESSED] =
96 theme->GetSystemColor(ui::NativeTheme::kColorId_ButtonHighlightColor); 98 theme->GetSystemColor(ui::NativeTheme::kColorId_ButtonHighlightColor);
97 } 99 }
98 100
101 // static
102 void PlatformStyle::OnTextfieldKeypressUnhandled() {
103 NSBeep();
104 }
105
99 } // namespace views 106 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/style/platform_style.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698