fix: reverse rating bar order to 5★→1★ in video slides
Some checks failed
CI / Check / Test (push) Failing after 42s

This commit is contained in:
2026-06-03 00:55:43 +02:00
parent 45d6183ea4
commit 3a66f89609

View File

@@ -350,9 +350,11 @@ impl SlideRenderer {
let margin_x = 120i32; let margin_x = 120i32;
let max_bar_w = (w as i32 - margin_x * 2) as u32; let max_bar_w = (w as i32 - margin_x * 2) as u32;
for (i, &count) in report.rating_distribution.iter().enumerate() { for row in 0..5 {
let label = format!("{}\u{2605}", i + 1); let stars = 5 - row;
let y = bar_area_top + (i as i32) * (bar_h as i32 + bar_gap as i32); let count = report.rating_distribution[stars - 1];
let label = format!("{stars}\u{2605}");
let y = bar_area_top + (row as i32) * (bar_h as i32 + bar_gap as i32);
self.draw_left(&mut img, &label, margin_x - 60, y + 2, 28.0, GOLD); self.draw_left(&mut img, &label, margin_x - 60, y + 2, 28.0, GOLD);
draw_filled_rect_mut( draw_filled_rect_mut(