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

Side by Side Diff: ui/views/views_delegate.cc

Issue 2702403010: Fix the absence of padding on some UI buttons. (Closed)
Patch Set: change switch Created 3 years, 9 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/views_delegate.h" 5 #include "ui/views/views_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "ui/views/layout/layout_constants.h" 9 #include "ui/views/layout/layout_constants.h"
10 #include "ui/views/views_touch_selection_controller_factory.h" 10 #include "ui/views/views_touch_selection_controller_factory.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 gfx::Insets ViewsDelegate::GetDialogFrameViewInsets() const { 146 gfx::Insets ViewsDelegate::GetDialogFrameViewInsets() const {
147 return gfx::Insets(kPanelVertMargin, kButtonHEdgeMarginNew, 0, 147 return gfx::Insets(kPanelVertMargin, kButtonHEdgeMarginNew, 0,
148 kButtonHEdgeMarginNew); 148 kButtonHEdgeMarginNew);
149 } 149 }
150 150
151 gfx::Insets ViewsDelegate::GetBubbleDialogMargins() const { 151 gfx::Insets ViewsDelegate::GetBubbleDialogMargins() const {
152 return gfx::Insets(kPanelVertMargin, kPanelHorizMargin); 152 return gfx::Insets(kPanelVertMargin, kPanelHorizMargin);
153 } 153 }
154 154
155 int ViewsDelegate::GetButtonMinimumWidth() const {
156 return kMinimumButtonWidth;
157 }
158
155 int ViewsDelegate::GetDialogButtonMinimumWidth() const { 159 int ViewsDelegate::GetDialogButtonMinimumWidth() const {
156 return kDialogMinimumButtonWidth; 160 return kDialogMinimumButtonWidth;
157 } 161 }
158 162
159 int ViewsDelegate::GetButtonHorizontalPadding() const { 163 int ViewsDelegate::GetButtonHorizontalPadding() const {
160 return 0; 164 return kButtonHorizontalPadding;
161 } 165 }
162 166
163 ViewsDelegate::ViewsDelegate() 167 ViewsDelegate::ViewsDelegate()
164 : views_tsc_factory_(new ViewsTouchEditingControllerFactory) { 168 : views_tsc_factory_(new ViewsTouchEditingControllerFactory) {
165 DCHECK(!views_delegate); 169 DCHECK(!views_delegate);
166 views_delegate = this; 170 views_delegate = this;
167 171
168 ui::TouchEditingControllerFactory::SetInstance(views_tsc_factory_.get()); 172 ui::TouchEditingControllerFactory::SetInstance(views_tsc_factory_.get());
169 173
170 #if defined(USE_AURA) 174 #if defined(USE_AURA)
171 touch_selection_menu_runner_.reset(new TouchSelectionMenuRunnerViews()); 175 touch_selection_menu_runner_.reset(new TouchSelectionMenuRunnerViews());
172 #endif 176 #endif
173 } 177 }
174 178
175 } // namespace views 179 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698