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:
parent
c4ec0ce820
commit
b91fd70410
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user