X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/da1f0e87e2c24ad9ee7647261dd986ad3e8d60eb..6f026b5b63fe7ccb025e84509886f74772b9df13:/src/generic/clrpickerg.cpp diff --git a/src/generic/clrpickerg.cpp b/src/generic/clrpickerg.cpp index 80de3e15a6..b76115f04a 100644 --- a/src/generic/clrpickerg.cpp +++ b/src/generic/clrpickerg.cpp @@ -4,7 +4,6 @@ // Author: Francesco Montorsi (readapted code written by Vadim Zeitlin) // Modified by: // Created: 15/04/2006 -// RCS-ID: $Id$ // Copyright: (c) Vadim Zeitlin, Francesco Montorsi // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -58,7 +57,7 @@ bool wxGenericColourButton::Create( wxWindow *parent, wxWindowID id, } // and handle user clicks on it - Connect(wxEVT_COMMAND_BUTTON_CLICKED, + Connect(GetId(), wxEVT_BUTTON, wxCommandEventHandler(wxGenericColourButton::OnButtonClick), NULL, this); @@ -83,7 +82,7 @@ void wxGenericColourButton::InitColourData() void wxGenericColourButton::OnButtonClick(wxCommandEvent& WXUNUSED(ev)) { - // update the wxColouData to be shown in the the dialog + // update the wxColouData to be shown in the dialog ms_data.SetColour(m_colour); // create the colour dialog and display it @@ -105,15 +104,15 @@ void wxGenericColourButton::UpdateColour() dc.SetPen( *wxTRANSPARENT_PEN ); dc.SetBrush( wxBrush(m_colour) ); dc.DrawRectangle( 0,0,m_bitmap.GetWidth(),m_bitmap.GetHeight() ); - -// if ( HasFlag(wxCLRP_SHOW_LABEL) ) + + if ( HasFlag(wxCLRP_SHOW_LABEL) ) { wxColour col( ~m_colour.Red(), ~m_colour.Green(), ~m_colour.Blue() ); dc.SetTextForeground( col ); dc.SetFont( GetFont() ); dc.DrawText( m_colour.GetAsString(wxC2S_HTML_SYNTAX), 0, 0 ); } - + dc.SelectObject( wxNullBitmap ); SetBitmapLabel( m_bitmap ); }