]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/colordlg.cpp
fixed another place where wxString was used as bool
[wxWidgets.git] / src / gtk / colordlg.cpp
index b264c991ca40c771829732df3237df87655210cc..34e9c118fea275d20cd3f43b18d11bee17fbbf99 100644 (file)
@@ -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);
     }