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

Unified Diff: chrome/views/controls/button/native_button.cc

Issue 42582: Making the enabled and visible states work in native buttons (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/views/controls/button/native_button.h ('k') | chrome/views/controls/button/native_button_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/views/controls/button/native_button.cc
===================================================================
--- chrome/views/controls/button/native_button.cc (revision 12464)
+++ chrome/views/controls/button/native_button.cc (working copy)
@@ -118,6 +118,12 @@
}
}
+void NativeButton::SetEnabled(bool flag) {
+ Button::SetEnabled(flag);
+ if (native_wrapper_)
+ native_wrapper_->UpdateEnabled();
+}
+
void NativeButton::ViewHierarchyChanged(bool is_add, View* parent,
View* child) {
if (is_add && !native_wrapper_ && GetWidget()) {
@@ -151,6 +157,7 @@
void NativeButton::CreateWrapper() {
native_wrapper_ = NativeButtonWrapper::CreateNativeButtonWrapper(this);
native_wrapper_->UpdateLabel();
+ native_wrapper_->UpdateEnabled();
}
void NativeButton::InitBorder() {
« no previous file with comments | « chrome/views/controls/button/native_button.h ('k') | chrome/views/controls/button/native_button_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698