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

Side by Side Diff: ui/views/style/platform_style.cc

Issue 2607923002: MacViews: Handle Space and Return keys correctly for Buttons. (Closed)
Patch Set: Address review. Created 3 years, 11 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
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 "build/build_config.h" 8 #include "build/build_config.h"
9 #include "ui/base/material_design/material_design_controller.h" 9 #include "ui/base/material_design/material_design_controller.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
(...skipping 26 matching lines...) Expand all
37 #if !defined(OS_MACOSX) 37 #if !defined(OS_MACOSX)
38 38
39 const int PlatformStyle::kComboboxNormalArrowPadding = 7; 39 const int PlatformStyle::kComboboxNormalArrowPadding = 7;
40 const int PlatformStyle::kMinLabelButtonWidth = 70; 40 const int PlatformStyle::kMinLabelButtonWidth = 70;
41 const int PlatformStyle::kMinLabelButtonHeight = 33; 41 const int PlatformStyle::kMinLabelButtonHeight = 33;
42 const bool PlatformStyle::kDefaultLabelButtonHasBoldFont = true; 42 const bool PlatformStyle::kDefaultLabelButtonHasBoldFont = true;
43 const bool PlatformStyle::kDialogDefaultButtonCanBeCancel = true; 43 const bool PlatformStyle::kDialogDefaultButtonCanBeCancel = true;
44 const bool PlatformStyle::kSelectWordOnRightClick = false; 44 const bool PlatformStyle::kSelectWordOnRightClick = false;
45 const CustomButton::NotifyAction PlatformStyle::kMenuNotifyActivationAction = 45 const CustomButton::NotifyAction PlatformStyle::kMenuNotifyActivationAction =
46 CustomButton::NOTIFY_ON_RELEASE; 46 CustomButton::NOTIFY_ON_RELEASE;
47 const CustomButton::ClickAction PlatformStyle::kClickActionOnSpace =
48 CustomButton::CLICK_ON_RELEASE;
49 const bool PlatformStyle::kReturnClicksFocusedControl = true;
47 const bool PlatformStyle::kTreeViewHasFocusRing = false; 50 const bool PlatformStyle::kTreeViewHasFocusRing = false;
48 const bool PlatformStyle::kTreeViewSelectionPaintsEntireRow = false; 51 const bool PlatformStyle::kTreeViewSelectionPaintsEntireRow = false;
49 const bool PlatformStyle::kUseRipples = true; 52 const bool PlatformStyle::kUseRipples = true;
50 const bool PlatformStyle::kMirrorBubbleArrowInRTLByDefault = true; 53 const bool PlatformStyle::kMirrorBubbleArrowInRTLByDefault = true;
51 54
52 // static 55 // static
53 gfx::ImageSkia PlatformStyle::CreateComboboxArrow(bool is_enabled, 56 gfx::ImageSkia PlatformStyle::CreateComboboxArrow(bool is_enabled,
54 Combobox::Style style) { 57 Combobox::Style style) {
55 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 58 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
56 return *rb.GetImageSkiaNamed(IDR_MENU_DROPARROW); 59 return *rb.GetImageSkiaNamed(IDR_MENU_DROPARROW);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 97
95 #if !defined(DESKTOP_LINUX) 98 #if !defined(DESKTOP_LINUX)
96 // static 99 // static
97 std::unique_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder( 100 std::unique_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder(
98 LabelButton* button) { 101 LabelButton* button) {
99 return button->CreateDefaultBorder(); 102 return button->CreateDefaultBorder();
100 } 103 }
101 #endif 104 #endif
102 105
103 } // namespace views 106 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698