Refactor resizing.

Signed-off-by: Gordon Smith <gordon.smith@lexisnexis.com>
Merge remote-tracking branch 'remotes/origin/ResizeWidget' into gh-pages