Fixes issue #165

- The MOUSEDOWN event actually gives you the offset relative to the mainColorRect widget, but the code was assuming an offset relative to the container widget.
- Simplified a few arithmetic calculations.
Merge pull request #195 from CIB/cleanup

Fixes issue #165