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

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

Issue 7289018: Makes NativeTextButton take focus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 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/text_button.h" 5 #include "views/controls/button/text_button.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 #if defined(OS_WIN) 789 #if defined(OS_WIN)
790 // Windows will like to show its own colors. 790 // Windows will like to show its own colors.
791 // Halos and such are ignored as they are always set by specific calls. 791 // Halos and such are ignored as they are always set by specific calls.
792 color_enabled_ = skia::COLORREFToSkColor(GetSysColor(COLOR_BTNTEXT)); 792 color_enabled_ = skia::COLORREFToSkColor(GetSysColor(COLOR_BTNTEXT));
793 color_disabled_ = skia::COLORREFToSkColor(GetSysColor(COLOR_GRAYTEXT)); 793 color_disabled_ = skia::COLORREFToSkColor(GetSysColor(COLOR_GRAYTEXT));
794 color_hover_ = color_ = color_enabled_; 794 color_hover_ = color_ = color_enabled_;
795 #endif 795 #endif
796 set_border(new TextButtonNativeThemeBorder(this)); 796 set_border(new TextButtonNativeThemeBorder(this));
797 set_ignore_minimum_size(false); 797 set_ignore_minimum_size(false);
798 set_alignment(ALIGN_CENTER); 798 set_alignment(ALIGN_CENTER);
799 set_focusable(true);
799 } 800 }
800 801
801 gfx::Size NativeTextButton::GetMinimumSize() { 802 gfx::Size NativeTextButton::GetMinimumSize() {
802 return GetPreferredSize(); 803 return GetPreferredSize();
803 } 804 }
804 805
805 std::string NativeTextButton::GetClassName() const { 806 std::string NativeTextButton::GetClassName() const {
806 return kViewClassName; 807 return kViewClassName;
807 } 808 }
808 809
809 } // namespace views 810 } // 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