computes the width and centers the action menu.