auto adjust toolbar position after window resize