1. more accurate conversion from 8-bit wx color to 16-bit GDK color

2. eliminate possiblity of wxColour RGB values changing depending on colormap
3. don't allow non-const pointer access to internal GdkColor


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2006-06-15 19:29:08 +00:00
parent 06414d99a7
commit c668531784
7 changed files with 57 additions and 66 deletions

View File

@@ -37,7 +37,9 @@ static void gtk_clrbutton_setcolor_callback(GtkColorButton *widget,
{
// update the m_colour member of the wxColourButton
wxASSERT(p);
gtk_color_button_get_color(widget, p->GetGdkColor());
GdkColor gdkColor;
gtk_color_button_get_color(widget, &gdkColor);
p->SetGdkColor(gdkColor);
// fire the colour-changed event
wxColourPickerEvent event(p, p->GetId(), p->GetColour());