refine margin between views calculation