From: Ben Pfaff Date: Mon, 8 Dec 2025 18:01:58 +0000 (-0800) Subject: fix colors X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a8f8582dde09f6560f5793f1f2df4087ad3d502;p=pspp fix colors --- diff --git a/rust/pspp/src/output/pivot/look_xml.rs b/rust/pspp/src/output/pivot/look_xml.rs index fcefe65c35..85bc1186a3 100644 --- a/rust/pspp/src/output/pivot/look_xml.rs +++ b/rust/pspp/src/output/pivot/look_xml.rs @@ -236,8 +236,8 @@ impl CellStyle { RowParity::Odd => self.alternating_text_color.unwrap_or(Color::BLACK), }, bg: match data_row { - RowParity::Even => self.color2.unwrap_or(Color::BLACK), - RowParity::Odd => self.alternating_color.unwrap_or(Color::BLACK), + RowParity::Even => self.color2.unwrap_or(Color::WHITE), + RowParity::Odd => self.alternating_color.unwrap_or(Color::WHITE), }, size: self.font_size.as_pt_i32(), }, diff --git a/rust/pspp/src/output/spv/light.rs b/rust/pspp/src/output/spv/light.rs index 7b120d5448..263f751004 100644 --- a/rust/pspp/src/output/spv/light.rs +++ b/rust/pspp/src/output/spv/light.rs @@ -431,13 +431,15 @@ impl Area { italic: (self.style & 2) != 0, underline: self.underline, font: self.typeface.decode(encoding), - fg: match data_row { - RowParity::Even => self.fg, - RowParity::Odd => self.alt_fg, + fg: if data_row == RowParity::Odd && self.alternate { + self.alt_fg + } else { + self.fg }, - bg: match data_row { - RowParity::Even => self.bg, - RowParity::Odd => self.alt_bg, + bg: if data_row == RowParity::Odd && self.alternate { + self.alt_bg + } else { + self.bg }, size: (self.size / 1.33) as i32, },