eczarny/spectacle — pull request #209 by alex-courtis (2014-05-25 04:35:29+00:00)
Title: Quantized height width window improvements

Love your work eczarny - this makes OSX much more usable.

**Problem**

As a dev, though, I do spend a lot of time in quantized size windows e.g. Terminal

The left/right one third/two thirds has never really worked properly for quantized size windows, relying on the fudge factor.

Also, quantized size windows were not centred nicely after they were relocated.

**Solution**

Use more intelligent window centre locations to detect half, one third, two thirds, allowing it to get it right for quantized size windows.

When the window doesn't move exactly into the location we want, iteratively reduce the size until it fits, then centre it in our desired location.

**Notes**

I did remove the artificial 1px gap introduced between half windows.

**Testing**

* 10.9.3
* Multi monitor, non retina
* Retina
* With and without "displays have separate spaces"
* Dock autohiding
* Dock on every side