def calc_box_fractions()

in src/pathpicker/screen_control.py [0:0]


    def calc_box_fractions(self) -> None:
        # what we can see is basically the fraction of our screen over
        # total num lines
        max_y, _max_x = self.screen_control.get_screen_dimensions()
        frac_displayed = min(1.0, (max_y / float(self.num_lines)))
        self.box_start_fraction = -self.screen_control.get_scroll_offset() / float(
            self.num_lines
        )
        self.box_stop_fraction = self.box_start_fraction + frac_displayed