Don't limit the selection of colors in the spectrum area

In this way when we capture the mouse, we can move it outside the
widget and we're still picking colors in the border of the spectrum.
(Which is useful to select pure black or white.)
This commit is contained in:
David Capello 2016-02-26 11:13:19 -03:00
parent d78f892236
commit 4e4f473dd6

View File

@ -42,7 +42,7 @@ ColorSpectrum::~ColorSpectrum()
app::Color ColorSpectrum::pickColor(const gfx::Point& pos) const
{
gfx::Rect rc = childrenBounds();
if (rc.isEmpty() || !rc.contains(pos))
if (rc.isEmpty())
return app::Color::fromMask();
int vmid = (align() & HORIZONTAL ? rc.h/2 : rc.w/2);