From b91fd70410ea5a408d292651704885c789b02c4f Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sat, 10 Mar 2007 18:50:16 +0000 Subject: [PATCH] use simpler color ctor git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44739 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/colordlg.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gtk/colordlg.cpp b/src/gtk/colordlg.cpp index b264c991ca..34e9c118fe 100644 --- a/src/gtk/colordlg.cpp +++ b/src/gtk/colordlg.cpp @@ -117,7 +117,7 @@ void wxColourDialog::DialogToColourData() GdkColor clr; gtk_color_selection_get_current_color(sel, &clr); - m_data.SetColour(wxColour(clr.red >> 8, clr.green >> 8, clr.blue >> 8)); + m_data.SetColour(wxColour(clr)); // Extract custom palette: @@ -131,9 +131,7 @@ void wxColourDialog::DialogToColourData() { for (int i = 0; i < wxMin(n_colors, 16); i++) { - m_data.SetCustomColour(i, wxColour(colors[i].red >> 8, - colors[i].green >> 8, - colors[i].blue >> 8)); + m_data.SetCustomColour(i, wxColour(colors[i])); } g_free(colors); }