pub fn recalculate(&mut self) {

        // First calculate the rows, giving prioritized rows the priority

        /* Loop over all the rows, subtracting the prioritized rows' percent from
        the available room percentage, and subtracting `1` from the number of
        total rows. This leaves us with the percent that the unprioritized rows
        will take up (`row_p`), and the number of unprioritized rows there are
        (`rows`)
        */
        let mut row_p = 100;
        let mut rows = self.rows.len();
        for row in &self.rows {
            if row.1 {
                row_p -= row.0;
                rows -= 1;
            }
        }

        // Now go through all the UNprioritized rows and divide the remaing
        // percent up between them
        let percent_for_rows = row_p / rows as u8;
        let mut i = 0;
        for row in &self.rows.clone() {
            if !row.1 {
                self.rows[i] = GridRow(percent_for_rows, false);
            }
            i += 1;
        }

        // Now calculate the columns, giving prioritized columns the priority

        /* Loop over all the columns, subtracting the prioritized columns' percent from
        the available room percentage, and subtracting `1` from the number of
        total columns. This leaves us with the percent that the unprioritized columns
        will take up (`column_p`), and the number of unprioritized columns there are
        (`columns`)
        */
        let mut column_p = 100;
        let mut columns = self.columns.len();
        for column in &self.columns {
            if column.1 {
                column_p -= column.0;
                columns -= 1;
            }
        }

        // Now go through all the UNprioritized columns and divide the remaing
        // percent up between them
        let percent_for_columns = column_p / columns as u8;
        let mut i = 0;
        for column in &self.columns.clone() {
            if !column.1 {
                self.columns[i] = GridColumn(percent_for_columns, false);
            }
            i += 1;
        }
    }
/// Recalculate the size of all the rows and columns based on which ones have
/// user-set percentates.
Recalculate the size of all the rows and columns based on which ones have
user-set percentates.
Recalculate the size of all the rows and columns based on which ones have user - set percentates .
pub fn recalculate(&mut self) {
        // First calculate the rows, giving prioritized rows the priority
        /* Loop over all the rows, subtracting the prioritized rows' percent from
        the available room percentage, and subtracting `1` from the number of
        total rows. This leaves us with the percent that the unprioritized rows
        will take up (`row_p`), and the number of unprioritized rows there are
        (`rows`)
        */
        let mut row_p = 100;
        let mut rows = self.rows.len();
        for row in &self.rows {
            if row.1 {
                row_p -= row.0;
                rows -= 1;
            }
        }
        // Now go through all the UNprioritized rows and divide the remaing
        // percent up between them
        let percent_for_rows = row_p / rows as u8;
        let mut i = 0;
        for row in &self.rows.clone() {
            if !row.1 {
                self.rows[i] = GridRow(percent_for_rows, false);
            }
            i += 1;
        }
        // Now calculate the columns, giving prioritized columns the priority
        /* Loop over all the columns, subtracting the prioritized columns' percent from
        the available room percentage, and subtracting `1` from the number of
        total columns. This leaves us with the percent that the unprioritized columns
        will take up (`column_p`), and the number of unprioritized columns there are
        (`columns`)
        */
        let mut column_p = 100;
        let mut columns = self.columns.len();
        for column in &self.columns {
            if column.1 {
                column_p -= column.0;
                columns -= 1;
            }
        }
        // Now go through all the UNprioritized columns and divide the remaing
        // percent up between them
        let percent_for_columns = column_p / columns as u8;
        let mut i = 0;
        for column in &self.columns.clone() {
            if !column.1 {
                self.columns[i] = GridColumn(percent_for_columns, false);
            }
            i += 1;
        }
    }
pub fn recalculate ( & mut self ) { // First calculate the rows, giving prioritized rows the priority /* Loop over all the rows, subtracting the prioritized rows' percent from
        the available room percentage, and subtracting `1` from the number of
        total rows. This leaves us with the percent that the unprioritized rows
        will take up (`row_p`), and the number of unprioritized rows there are
        (`rows`)
        */ let mut row_p = 100 ; let mut rows = self . rows . len ( ) ; for row in & self . rows { if row . 1 { row_p -= row . 0 ; rows -= 1 ; } } // Now go through all the UNprioritized rows and divide the remaing // percent up between them let percent_for_rows = row_p / rows as u8 ; let mut i = 0 ; for row in & self . rows . clone ( ) { if ! row . 1 { self . rows [ i ] = GridRow ( percent_for_rows , false ) ; } i += 1 ; } // Now calculate the columns, giving prioritized columns the priority /* Loop over all the columns, subtracting the prioritized columns' percent from
        the available room percentage, and subtracting `1` from the number of
        total columns. This leaves us with the percent that the unprioritized columns
        will take up (`column_p`), and the number of unprioritized columns there are
        (`columns`)
        */ let mut column_p = 100 ; let mut columns = self . columns . len ( ) ; for column in & self . columns { if column . 1 { column_p -= column . 0 ; columns -= 1 ; } } // Now go through all the UNprioritized columns and divide the remaing // percent up between them let percent_for_columns = column_p / columns as u8 ; let mut i = 0 ; for column in & self . columns . clone ( ) { if ! column . 1 { self . columns [ i ] = GridColumn ( percent_for_columns , false ) ; } i += 1 ; } }
Recalculate the size of all the rows and columns based on which ones have
user-set percentates.
Recalculate the size of all the rows and columns based on which ones have user - set percentates .
&mut self
&mut self