From 40a6b36bccda82a31aacada1c3384ce2075187a7 Mon Sep 17 00:00:00 2001 From: Kinneyzhang Date: Thu, 10 Sep 2026 02:55:41 +0800 Subject: [PATCH] Fix layer menu sizing and preview parity checks --- examples/layer-reference.ebox | 2 +- tests/ebox-playground-layer-tests.el | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/layer-reference.ebox b/examples/layer-reference.ebox index 6d26052..417c675 100644 --- a/examples/layer-reference.ebox +++ b/examples/layer-reference.ebox @@ -94,7 +94,7 @@ (box :id "root-menu" :position absolute :layer root :anchor "menu-trigger" :placement bottom-start :z-index 50 :visibility hidden :width (ch 26) :height (lh 3) :background-color "#153F4A" :color "#FFFFFF" - (box :padding-inline (ch 1) "ROOT MENU / choose a color") + (box :padding-inline (ch 1) "ROOT MENU / choose") (box :id "menu-sage" :padding-inline (ch 1) :pointer hand :hover-style (:background-color "#407E5C") :help-echo "Choose sage, update the result, and close the menu." diff --git a/tests/ebox-playground-layer-tests.el b/tests/ebox-playground-layer-tests.el index 9bd5931..3998a92 100644 --- a/tests/ebox-playground-layer-tests.el +++ b/tests/ebox-playground-layer-tests.el @@ -54,7 +54,10 @@ (defun ebox-playground-layer-test--parity () "Compare native paint and interactions with the committed snapshot render." - (let* ((snapshot (ebox-surface-buffer-snapshot (current-buffer))) + (let* ((state (ebox--buffer-render-state (current-buffer))) + (ebox-viewport-width (plist-get state :viewport-width)) + (ebox-viewport-height (plist-get state :viewport-height)) + (snapshot (ebox-surface-buffer-snapshot (current-buffer))) (fresh (ebox-render (plist-get snapshot :input)))) (should (ebox-canonical-input-p (plist-get snapshot :input))) (should