git.lucas.co / cce-data-editor
structured data editor
git clone https://git.lucas.co/cce-data-editor.git

commit06f729da4bfc23afa029dc987748646060557bea
parent659e8a8b79
authorLucas Galante <[email protected]>
date2026-07-21 10:03
style: plate spacing from backplate_padding/backplate_gap config

Content rim padding and menubar side padding (were 10) and the
tree/editor split gap (was 10) now come from cce-ui's DE-wide keys —
matching cce-files side by side. Requires cce-ui with
backplate_padding/backplate_gap.

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

 src/main.rs | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index 1313f0f..70f89bc 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -685,7 +685,7 @@ impl Application for DataEditorApp {
             .with_recess(true)
             .with_text_offset_x(15.0);
 
-            let split = SplitPane::new(0.49, 100.0, 100.0, 10.0);
+            let split = SplitPane::new(0.49, 100.0, 100.0, cce_ui::layout::backplate_gap());
 
             Self {
                 keys: DataEditorKeys::load(),
@@ -1237,16 +1237,19 @@ impl Application for DataEditorApp {
                 let root = arena.insert(LayoutBox::container(
                     Style::column().cross_align(CrossAlign::Stretch),
                 ));
+                // DE-wide plate rim padding (style.surface.backplate.padding);
+                // the pane gap is the SplitPane's, seeded from backplate_gap.
+                let plate_pad = cce_ui::layout::backplate_padding();
                 let top_bar = arena.insert(LayoutBox::container({
                     let mut s = Style::row().height(Length::Fixed(42.0));
-                    s.padding = Edges { left: 10.0, right: 10.0, top: 8.0, bottom: 8.0 };
+                    s.padding = Edges { left: plate_pad, right: plate_pad, top: 8.0, bottom: 8.0 };
                     s
                 }));
                 let menu_leaf = arena.insert(LayoutBox::leaf(Style::row(), LSize::new(70.0, 26.0)));
                 let content = arena.insert(LayoutBox::container({
                     let mut s = Style::row()
                         .grow(1.0)
-                        .padding(10.0)
+                        .padding(plate_pad)
                         .gap(self.split.gap)
                         .cross_align(CrossAlign::Stretch);
                     s.min_height = 120.0;