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

Side by Side Diff: views/controls/button/native_button.cc

Issue 7104095: Disable animation for buttons on hover (r88176 and r88149). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/controls/button/native_button.h" 5 #include "views/controls/button/native_button.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "ui/base/keycodes/keyboard_codes.h" 8 #include "ui/base/keycodes/keyboard_codes.h"
9 #include "views/controls/native/native_view_host.h" 9 #include "views/controls/native/native_view_host.h"
10 10
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 } 241 }
242 242
243 #if defined(TOUCH_UI) 243 #if defined(TOUCH_UI)
244 //////////////////////////////////////////////////////////////////////////////// 244 ////////////////////////////////////////////////////////////////////////////////
245 // NativeButton, public: 245 // NativeButton, public:
246 246
247 NativeButton::NativeButton(ButtonListener* listener, const std::wstring& label) 247 NativeButton::NativeButton(ButtonListener* listener, const std::wstring& label)
248 : TextButton(listener, label), is_default_(false) { 248 : TextButton(listener, label), is_default_(false) {
249 set_alignment(TextButton::ALIGN_CENTER); 249 set_alignment(TextButton::ALIGN_CENTER);
250 static_cast<TextButtonBorder*>(border())->copy_normal_set_to_hot_set(); 250 static_cast<TextButtonBorder*>(border())->copy_normal_set_to_hot_set();
251 set_animate_on_state_change(false);
251 set_focusable(true); 252 set_focusable(true);
252 } 253 }
253 254
254 void NativeButton::SetLabel(const std::wstring& label) { 255 void NativeButton::SetLabel(const std::wstring& label) {
255 SetText(label); 256 SetText(label);
256 } 257 }
257 258
258 void NativeButton::set_font(const gfx::Font& font) { 259 void NativeButton::set_font(const gfx::Font& font) {
259 SetFont(font); 260 SetFont(font);
260 } 261 }
(...skipping 19 matching lines...) Expand all
280 281
281 NativeButton::NativeButton(ButtonListener* listener, const std::wstring& label) 282 NativeButton::NativeButton(ButtonListener* listener, const std::wstring& label)
282 : NativeButtonBase(listener, label) { 283 : NativeButtonBase(listener, label) {
283 } 284 }
284 285
285 NativeButton::~NativeButton() { 286 NativeButton::~NativeButton() {
286 } 287 }
287 #endif 288 #endif
288 289
289 } // namespace views 290 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698