Merge "Refactor DragDetector and fix a few resizing bugs" into tm-qpr-dev