FIX: Sets the patternFill to solid when changing the background color
This commit is contained in:
committed by
Nicolás Hatcher Andrés
parent
4016eb5944
commit
f26cdd3a4b
@@ -145,6 +145,7 @@ fn basic_fill() {
|
||||
let style = model.get_cell_style(0, 1, 1).unwrap();
|
||||
assert_eq!(style.fill.bg_color, None);
|
||||
assert_eq!(style.fill.fg_color, None);
|
||||
assert_eq!(&style.fill.pattern_type, "none");
|
||||
|
||||
// bg_color
|
||||
model
|
||||
@@ -156,6 +157,7 @@ fn basic_fill() {
|
||||
let style = model.get_cell_style(0, 1, 1).unwrap();
|
||||
assert_eq!(style.fill.bg_color, Some("#F2F2F2".to_owned()));
|
||||
assert_eq!(style.fill.fg_color, Some("#F3F4F5".to_owned()));
|
||||
assert_eq!(&style.fill.pattern_type, "solid");
|
||||
|
||||
let send_queue = model.flush_send_queue();
|
||||
|
||||
|
||||
@@ -882,9 +882,11 @@ impl UserModel {
|
||||
}
|
||||
"fill.bg_color" => {
|
||||
style.fill.bg_color = color(value)?;
|
||||
style.fill.pattern_type = "solid".to_string();
|
||||
}
|
||||
"fill.fg_color" => {
|
||||
style.fill.fg_color = color(value)?;
|
||||
style.fill.pattern_type = "solid".to_string();
|
||||
}
|
||||
"num_fmt" => {
|
||||
value.clone_into(&mut style.num_fmt);
|
||||
|
||||
Reference in New Issue
Block a user