(self, logical_index, _, new_size)
Force the horizontal and vertical header to maintain the defined
        aspect ratio specified for the histogram.
Force the horizontal and vertical header to maintain the defined
        aspect ratio specified for the histogram.
Force the horizontal and vertical header to maintain the defined aspect ratio specified for the histogram .
def bind_histogram_aspect_ratio(self, logical_index, _, new_size):
        """Force the horizontal and vertical header to maintain the defined
        aspect ratio specified for the histogram."""
        # Prevent function being exectued more than once per resize
        if logical_index is not self.model().Columns.DISTRIBUTION.index:
            return
        ratio_width, ratio_height = self.HISTOGRAM_ASPECT_RATIO
        unit_width = new_size / ratio_width
        new_height = unit_width * ratio_height
        effective_height = max(new_height, self.MINIMUM_HISTOGRAM_HEIGHT)
        effective_height = min(effective_height, self.MAXIMUM_HISTOGRAM_HEIGHT)
        self.verticalHeader().setDefaultSectionSize(effective_height)
def bind_histogram_aspect_ratio ( self , logical_index , _ , new_size ) : # Prevent function being exectued more than once per resize if logical_index is not self . model ( ) . Columns . DISTRIBUTION . index : return ratio_width , ratio_height = self . HISTOGRAM_ASPECT_RATIO unit_width = new_size / ratio_width new_height = unit_width * ratio_height effective_height = max ( new_height , self . MINIMUM_HISTOGRAM_HEIGHT ) effective_height = min ( effective_height , self . MAXIMUM_HISTOGRAM_HEIGHT ) self . verticalHeader ( ) . setDefaultSectionSize ( effective_height )