Method to scale the floating window as the code was duplicated.