use autolayout to resize widget when it's contentsize changes