pub fn gtk_win_scale(win: &gtk::Window, rat: Ratio, fact: Percent) -> Option<(i32, i32)> {
    let scr = win.get_screen()?;
    let dims = scr.get_monitor_geometry(scr.get_number());
    let scale_dims = rescale(fact, dims.width, dims.height)?;
    let (_, scaled) = rat.scale(scale_dims.0, scale_dims.1)?;
    Some(scaled)
}
/// returns None if fact is 0, -inf, inf or NaN or if win doesn't have a screen
returns None if fact is 0, -inf, inf or NaN or if win doesn't have a screen
returns None if fact is 0 - inf inf or NaN or if win doesn ' t have a screen
pub fn gtk_win_scale(win: &gtk::Window, rat: Ratio, fact: Percent) -> Option<(i32, i32)> {
    let scr = win.get_screen()?;
    let dims = scr.get_monitor_geometry(scr.get_number());
    let scale_dims = rescale(fact, dims.width, dims.height)?;
    let (_, scaled) = rat.scale(scale_dims.0, scale_dims.1)?;
    Some(scaled)
}
pub fn gtk_win_scale ( win : & gtk :: Window , rat : Ratio , fact : Percent ) -> Option < ( i32 , i32 ) > { let scr = win . get_screen ( ) ? ; let dims = scr . get_monitor_geometry ( scr . get_number ( ) ) ; let scale_dims = rescale ( fact , dims . width , dims . height ) ? ; let ( _ , scaled ) = rat . scale ( scale_dims . 0 , scale_dims . 1 ) ? ; Some ( scaled ) }
returns None if fact is 0, -inf, inf or NaN or if win doesn't have a screen
returns None if fact is 0 - inf inf or NaN or if win doesn ' t have a screen
win
&gtk::Window
rat
Ratio
fact
Percent
win
&gtk::Window
rat
Ratio
fact
Percent