blob: ddda312a6af5b1eedfea8967596b9443766d9692 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
use tui::style::Style;
use crate::canvas::canvas_styling::CanvasStyling;
#[derive(Default)]
pub struct DataTableStyling {
pub header_style: Style,
pub border_style: Style,
pub highlighted_border_style: Style,
pub text_style: Style,
pub highlighted_text_style: Style,
pub title_style: Style,
}
impl DataTableStyling {
pub fn from_colours(colours: &CanvasStyling) -> Self {
Self {
header_style: colours.table_header_style,
border_style: colours.border_style,
highlighted_border_style: colours.highlighted_border_style,
text_style: colours.text_style,
highlighted_text_style: colours.currently_selected_text_style,
title_style: colours.widget_title_style,
}
}
}
|