more table themes rounded and reinforced (#2579)

This commit is contained in:
Darren Schroeder 2020-09-19 12:10:34 -05:00 committed by GitHub
parent 4c10351579
commit 2b13ac3856
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 62 additions and 0 deletions

View File

@ -57,6 +57,8 @@ pub fn table_mode(config: &NuConfig) -> nu_table::Theme {
Ok(m) if m == "thin" => nu_table::Theme::thin(),
Ok(m) if m == "with_love" => nu_table::Theme::with_love(),
Ok(m) if m == "compact_double" => nu_table::Theme::compact_double(),
Ok(m) if m == "rounded" => nu_table::Theme::rounded(),
Ok(m) if m == "reinforced" => nu_table::Theme::reinforced(),
_ => nu_table::Theme::compact(),
})
}

View File

@ -476,6 +476,66 @@ impl Theme {
print_bottom_border: true,
}
}
#[allow(unused)]
pub fn rounded() -> Theme {
Theme {
top_left: '',
middle_left: '',
bottom_left: '',
top_center: '',
center: '',
bottom_center: '',
top_right: '',
middle_right: '',
bottom_right: '',
top_horizontal: '',
middle_horizontal: '',
bottom_horizontal: '',
left_vertical: '',
center_vertical: '',
right_vertical: '',
separate_header: true,
separate_rows: false,
print_left_border: true,
print_right_border: true,
print_top_border: true,
print_bottom_border: true,
}
}
#[allow(unused)]
pub fn reinforced() -> Theme {
Theme {
top_left: '',
middle_left: '',
bottom_left: '',
top_center: '',
center: '',
bottom_center: '',
top_right: '',
middle_right: '',
bottom_right: '',
top_horizontal: '',
middle_horizontal: '',
bottom_horizontal: '',
left_vertical: '',
center_vertical: '',
right_vertical: '',
separate_header: true,
separate_rows: false,
print_left_border: true,
print_right_border: true,
print_top_border: true,
print_bottom_border: true,
}
}
}
impl Table {