git.lucas.co / cce-files
file manager
git clone https://git.lucas.co/cce-files.git

commit326b03c2dad66b84db6ebc42683ee7408185dce2
parentea9b8a796c
authorLucas Galante <[email protected]>
date2026-08-15 11:18
fix: fill the preview well to its rect, like the list across the split

Third pass of the relief audit (after 751d183 and ea9b8a7). The mechanical
checks came back clean: both `relief_recessed` calls are handed true heights
so the dropdown's depth drift cannot occur, `set_rect` immediately precedes
`push_prims` so the rect is never a frame stale, and PreviewPane is an
app-owned struct with no widget paint() to mirror, so there is no
inset_plate-style parity to restore.

What did not hold was the claim the comment made. It said the fill spans
"like the list's fill spans its rect - so the well reads as one dark
surface", but `RowList::push_prims` fills at EXACTLY its well rect with the
well's corner radius, while this filled a square-cornered rect inset to the
content box (cy + 12, half_h - pad - 24). Measured on a live frame, that
left the well floor showing plate colour in a shelf ~7px deep at the top and
~12px at the bottom, where the list's fill ran edge to edge into its rim.

Filling at the well rect, rounded, is RowList's call verbatim. The content
box is untouched - text and images already start at rect_y - so nothing
moves but the shelf.

Pixel-diffed against the installed binary, same directory and window size,
baseline reproduced byte-identically first. The diff is bounded to
(1024,24)-(2040,504): the top well only, with the Details well and the list
untouched. The proof it is now the same material as the list is the rim
sequence - the list's bottom rim reads 76.2, 97.0, 75.1, 76.2 and this well
now reads 76.2, 97.0, 75.1, 76.2, where before it read 90.2, 107.1, 88.1,
90.2: the same shape ~14 lighter, because the carve was shading against
plate instead of against fill.

The Details well keeps its plate floor deliberately - it is an info panel,
not a content surface, and that is what distinguishes it from the two dark
wells.

 src/preview_pane.rs | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/preview_pane.rs b/src/preview_pane.rs
index 460637f..fbee607 100644
--- a/src/preview_pane.rs
+++ b/src/preview_pane.rs
@@ -188,6 +188,10 @@ impl PreviewPane {
     }
 
     fn emit(&self, pc: &mut PageContent) {
+        // For `rect_with_radius_corners` on the well fill — the inherent
+        // `rect`/`text` methods still win over the trait's by the usual
+        // inherent-first rule, so the calls below are unaffected.
+        use cce_ui::layout::RenderTarget;
         let (cx, cy, cw, ch) = self.rect;
 
         let text_fg = cce_ui::color::TEXT_FG;
@@ -229,11 +233,16 @@ impl PreviewPane {
         let rect_y = cy + 12.0;
         let rect_h = half_h - pad - 24.0;
 
-        // Content fill spans the FULL well width (like the list's fill spans
-        // its rect) — the recess carves over it, so the well reads as one dark
-        // surface flush with the pane edge across the split.
+        // Content fill spans the FULL well RECT, rounded to the well's radius —
+        // `RowList::push_prims` verbatim, so the two read as the same material
+        // across the split. It used to be a square-cornered rect inset to the
+        // content box (cy + 12, half_h - pad - 24), which left the well floor
+        // showing plate colour in a shelf ~7px deep at the top and ~12px at the
+        // bottom while the list's fill ran edge to edge into its rim. The
+        // content box below is unchanged: text and images already start at
+        // rect_y, so widening the fill moves nothing but the shelf.
         let bg_color = cce_ui::color::list_bg_color();
-        pc.rect(bg_color, cx, rect_y, cw, rect_h);
+        pc.rect_with_radius_corners(bg_color, cx, cy, cw, half_h, radius, (true, true, true, true));
 
         if let Some((id, img_w, img_h)) = self.image_tex {
             let fitted = fit_rect(