]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/bmpbuttn.cpp
Rebaked (build/bakefiles/common.bkl 1.95->1.96 change)
[wxWidgets.git] / src / msw / bmpbuttn.cpp
index 8a7ff239e0646a16a75a33c9b74551cbb6b5504e..d40d422eda00b0982cedd213a304a16e114b101a 100644 (file)
@@ -89,6 +89,10 @@ wxCONSTRUCTOR_5( wxBitmapButton , wxWindow* , Parent , wxWindowID , Id , wxBitma
 IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton)
 #endif
 
+BEGIN_EVENT_TABLE(wxBitmapButton, wxBitmapButtonBase)
+    EVT_SYS_COLOUR_CHANGED(wxBitmapButton::OnSysColourChanged)
+END_EVENT_TABLE()
+
 /*
 TODO PROPERTIES :
 
@@ -183,6 +187,19 @@ bool wxBitmapButton::SetBackgroundColour(const wxColour& colour)
     return true;
 }
 
+void wxBitmapButton::OnSysColourChanged(wxSysColourChangedEvent& event)
+{
+    m_brushDisabled = wxNullBrush;
+
+    if ( !IsEnabled() )
+    {
+        // this change affects our current state
+        Refresh();
+    }
+
+    event.Skip();
+}
+
 // VZ: should be at the very least less than wxDEFAULT_BUTTON_MARGIN
 #define FOCUS_MARGIN 3