take border into account when calculating squareSize

I the cases I tested, this left me with pixel perfect sizing of the squares.