Factor in width of legend when positioning from right