git.lucas.co / cce-preview
document and image viewer
git clone https://git.lucas.co/cce-preview.git

commit6b04ca1e3f3da2ca8cdda8fe3e065d4f5a99c1f3
parent7e436aedd8
authorLucas Galante <[email protected]>
date2026-09-24 14:39
Root plate: the toolkit's standard spec under the full-bleed content

The window's base is cce-ui's standard root plate (PaintCtx::root_plate)
in place of a hardcoded full-window quad. This is a viewer: its content
is drawn full-bleed on the plate, which is the accepted exception to the
standard app anatomy — the plate is the surface, the content covers it.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

 src/main.rs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main.rs b/src/main.rs
index b5f8345..b7cb146 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -520,7 +520,9 @@ impl Application for PreviewApp {
         self.scale = scale;
         self.store.begin_frame();
         let mut pc = PaintCtx::new();
-        pc.quad(Rect { x: 0.0, y: 0.0, width: size.width, height: size.height }, self.clear_color());
+        // The standard root plate (cce-ui PlateSpec::window); the document is
+        // full-bleed content drawn on it.
+        pc.root_plate(size.width, size.height);
 
         if self.doc.is_none() {
             let msg = self.error.as_deref().unwrap_or("Press 'o' to open a file");