summaryrefslogtreecommitdiff
path: root/src/config/theme/sheetview.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config/theme/sheetview.rs')
-rw-r--r--src/config/theme/sheetview.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/config/theme/sheetview.rs b/src/config/theme/sheetview.rs
index bcd53e1..af0b585 100644
--- a/src/config/theme/sheetview.rs
+++ b/src/config/theme/sheetview.rs
@@ -10,6 +10,7 @@ pub struct SheetViewTheme {
pub cursor: EvalTo<Style, CellRef>,
pub selection: EvalTo<Style, CellRef>,
pub cell: EvalTo<Style, CellRef>,
+ pub background: EvalTo<Style, ()>,
}
impl SheetViewTheme {
@@ -18,6 +19,7 @@ impl SheetViewTheme {
cursor: EvalTo::Value(Style::new().fg(Color::Black).bg(Color::White)),
selection: EvalTo::Value(Style::new().fg(Color::White).bg(Color::DarkGray)),
cell: EvalTo::Value(Style::new().fg(Color::White).bg(Color::Black)),
+ background: EvalTo::Value(Style::new().bg(Color::Black)),
}
}
}
@@ -44,17 +46,21 @@ impl UserData for SheetViewTheme {
});
fields.add_field_function_get("selection", |_, _| Ok(cfg!().selection.clone()));
-
fields.add_field_function_set("selection", |_, _, pair: EvalTo<Style, CellRef>| {
cfg_mut!().selection = pair;
Ok(())
});
fields.add_field_function_get("cell", |_, _| Ok(cfg!().cell.clone()));
-
fields.add_field_function_set("cell", |_, _, cell: EvalTo<Style, CellRef>| {
cfg_mut!().cell = cell;
Ok(())
});
+
+ fields.add_field_function_get("background", |_, _| Ok(cfg!().background.clone()));
+ fields.add_field_function_set("background", |_, _, background: EvalTo<Style, ()>| {
+ cfg_mut!().background = background;
+ Ok(())
+ });
}
}