take border into account when calculating squareSize