Added new width calculation for detailView