def set_row_heights(self):
        """
            the row height is defined by following factors:
                * how many facts are there in the day
                * does the fact have description / tags

            This func creates a list of row start positions to be able to
            quickly determine what to display
        """
        if not self.height:
            return

        y, pos, heights = 0, [], []

        for date, facts in self.days:
            height = 0
            for fact in facts:
                fact_height = self.fact_row.height(fact)
                fact.y = y + height
                fact.height = fact_height

                height += fact.height

            height += self.day_padding

            if not facts:
                height = 10
            else:
                height = max(height, 60)

            pos.append(y)
            heights.append(height)
            y += height


        self.row_positions, self.row_heights = pos, heights

        maxy = max(y, 1)

        if self.vadjustment:
            self.vadjustment.set_lower(0)
            self.vadjustment.set_upper(max(maxy, self.height))
            self.vadjustment.set_page_size(self.height)
def set_row_heights ( self ) : if not self . height : return y , pos , heights = 0 , [ ] , [ ] for date , facts in self . days : height = 0 for fact in facts : fact_height = self . fact_row . height ( fact ) fact . y = y + height fact . height = fact_height height += fact . height height += self . day_padding if not facts : height = 10 else : height = max ( height , 60 ) pos . append ( y ) heights . append ( height ) y += height self . row_positions , self . row_heights = pos , heights maxy = max ( y , 1 ) if self . vadjustment : self . vadjustment . set_lower ( 0 ) self . vadjustment . set_upper ( max ( maxy , self . height ) ) self . vadjustment . set_page_size ( self . height )
the row height is defined by following factors:
                * how many facts are there in the day
                * does the fact have description / tags

            This func creates a list of row start positions to be able to
            quickly determine what to display