From 1788c5a771dc1aa5eb11350c069c0041451364f6 Mon Sep 17 00:00:00 2001 From: dantebertuzzi Date: Tue, 20 Oct 2026 19:12:20 -0300 Subject: [PATCH] Grid: paint the scrollbar's column beside the column headings The vertical scrollbar's track starts below the column headings (and any frozen rows), and nothing painted the bar's column above it, so dark mode showed a white square at the top-right corner of the grid. The whole column now takes the track colour. Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/grid.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/ui-egui/src/grid.rs b/crates/ui-egui/src/grid.rs index 106bc6684..60dfd143f 100644 --- a/crates/ui-egui/src/grid.rs +++ b/crates/ui-egui/src/grid.rs @@ -791,6 +791,9 @@ pub fn show(app: &mut SheetApp, ui: &mut egui::Ui) { header_menu(app, ui, previous_popups.2 == app.grid.header_menu); context_menu(app, ui); let track_x = if rtl { (available.left(), rect.left()) } else { (rect.right(), available.right()) }; + // The track starts below the column headings and frozen rows; the bar's column beside them + // takes its colour too instead of showing a light square in dark mode. + ui.painter().rect_filled(Rect::from_min_max(pos2(track_x.0, rect.top()), pos2(track_x.1, rect.bottom())), 0.0, t.tab_bar); vertical_scrollbar(app, ui, sh, &geo, track_x, max_y, &t); if app.session.clipboard.is_some() { // By the clock, not per frame: a gliding outline repaints more often than the ants step.