Calculate how wide each field should be so we can align them.

        We always find room for the summaries since these are short and
        packed with information. If possible, we will also find room for
        labels, but if this would make the progress bar width shorter than
        the specified minium then we will shorten the labels, though never
        below the minium there. If this mean we have bars that are too wide
        for the terminal, then your terminal needs to be wider.

def calculate_field_widths(self, width=None,
                               min_label_width=10,
                               min_progress_width=10):
        """Calculate how wide each field should be so we can align them.

        We always find room for the summaries since these are short and
        packed with information. If possible, we will also find room for
        labels, but if this would make the progress bar width shorter than
        the specified minium then we will shorten the labels, though never
        below the minium there. If this mean we have bars that are too wide
        for the terminal, then your terminal needs to be wider.
        """
        if width is None:  # pragma: no cover
            width = shutil.get_terminal_size()[0]

        summary_width = self.summary_width()
        label_width = self.label_width()
        remaining = width - summary_width - label_width - 2

        if remaining >= min_progress_width:
            progress_width = remaining
        else:
            progress_width = min_progress_width
            remaining = width - summary_width - progress_width - 2
            if remaining >= min_label_width:
                label_width = remaining
            else:
                label_width = min_label_width

        return (label_width, progress_width, summary_width)