From e6bce425323a8a72b4b3f68be06960047e0e0054 Mon Sep 17 00:00:00 2001 From: daa Date: Sun, 10 Dec 2017 21:28:30 +0300 Subject: [PATCH] Don't draw foreground in case it is same as background investigatin of #26, but still need some amount of work --- src/render/mod.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/render/mod.rs b/src/render/mod.rs index 79e6ac5..3622a32 100644 --- a/src/render/mod.rs +++ b/src/render/mod.rs @@ -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(); + } } } }