From bc1e19f1f652e60c4ca44595da3af58d6f6531a8 Mon Sep 17 00:00:00 2001 From: AnhNgoo <110978888+AnhNgoo@users.noreply.github.com> Date: Thu, 29 Oct 2026 10:02:14 +0700 Subject: [PATCH] docs(grid): document cell painting and clipping behavior --- crates/ui-egui/src/grid/quadrant.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/ui-egui/src/grid/quadrant.rs b/crates/ui-egui/src/grid/quadrant.rs index 5d60a2441..554bdcfdd 100644 --- a/crates/ui-egui/src/grid/quadrant.rs +++ b/crates/ui-egui/src/grid/quadrant.rs @@ -317,6 +317,10 @@ fn should_expand_text(filter_space: f32, overflows: bool, across_end: u32, col: filter_space == 0.0 && (overflows || across_end > col) && !in_merge } +/// Paint one worksheet cell using its computed appearance and visible geometry. +/// +/// Handles text layout, wrapping, alignment, overflow into neighbouring cells, +/// and clipping, while preserving cell decoration and merged-cell constraints. fn paint_cell(q: &QuadrantPaint<'_>, painted: &(CellRef, Rect, Look, Option), merges: &[RangeRef]) { let (cell, rect, lk, cfl) = painted; let c = *cell;