DVUI

numScrollDefault

Calculate the number of rows to scroll based on the grid's viewport height / row height.

Parameters

#
grid:*const GridWidget
*const GridWidget

Source

Implementation

#
pub fn numScrollDefault(grid: *const GridWidget) isize {
        const default: isize = 5;
        if (grid.row_height < 1) {
            return default;
        }
        return @round(grid.bsi.viewport.h / grid.row_height);
    }