use simpler color ctor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44739 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -117,7 +117,7 @@ void wxColourDialog::DialogToColourData()
|
|||||||
|
|
||||||
GdkColor clr;
|
GdkColor clr;
|
||||||
gtk_color_selection_get_current_color(sel, &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:
|
// Extract custom palette:
|
||||||
|
|
||||||
@@ -131,9 +131,7 @@ void wxColourDialog::DialogToColourData()
|
|||||||
{
|
{
|
||||||
for (int i = 0; i < wxMin(n_colors, 16); i++)
|
for (int i = 0; i < wxMin(n_colors, 16); i++)
|
||||||
{
|
{
|
||||||
m_data.SetCustomColour(i, wxColour(colors[i].red >> 8,
|
m_data.SetCustomColour(i, wxColour(colors[i]));
|
||||||
colors[i].green >> 8,
|
|
||||||
colors[i].blue >> 8));
|
|
||||||
}
|
}
|
||||||
g_free(colors);
|
g_free(colors);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user