Don't draw foreground in case it is same as background

investigatin of #26, but still need some amount of work
This commit is contained in:
daa 2017-12-10 21:28:30 +03:00
parent 7325837d07
commit e6bce42532
1 changed files with 5 additions and 3 deletions

View File

@ -152,9 +152,11 @@ fn draw_cell(
} else if !line.is_binded_to_item(col) {
let bg = color_model.cell_bg(cell);
if let Some(bg) = bg {
ctx.set_source_rgb(bg.0, bg.1, bg.2);
ctx.rectangle(line_x, line_y, char_width, line_height);
ctx.fill();
if bg != &color_model.bg_color {
ctx.set_source_rgb(bg.0, bg.1, bg.2);
ctx.rectangle(line_x, line_y, char_width, line_height);
ctx.fill();
}
}
}
}