wxColour components are in 0.255 range while NSColor ones are in 0..1 one. The
old code compiled just fine but didn't work correctly for any colours which
had any channel with value different from 0 and 255 (unsurprisingly, my tests
only used wxRED, wxGREEN and wxBLUE which all passed...).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62396
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
}
const wxColour& c = attr.GetColour();
- colText = [NSColor colorWithDeviceRed:c.Red()
- green:c.Green()
- blue:c.Blue()
- alpha:c.Alpha()];
+ colText = [NSColor colorWithDeviceRed:c.Red() / 255.
+ green:c.Green() / 255.
+ blue:c.Blue() / 255.
+ alpha:c.Alpha() / 255.];
}
}
}