improve autolayout to set the prefs width automatically