Avoid deprecation warnings and fix the computation of the source rect for quick look on retina macs