Possible improvement to widget resizing.