Fix layer menu sizing and preview parity checks

This commit is contained in:
Kinneyzhang 2026-09-10 02:55:41 +08:00
parent 834c05f18b
commit 40a6b36bcc
2 changed files with 5 additions and 2 deletions

View File

@ -94,7 +94,7 @@
(box :id "root-menu" :position absolute :layer root :anchor "menu-trigger" (box :id "root-menu" :position absolute :layer root :anchor "menu-trigger"
:placement bottom-start :z-index 50 :visibility hidden :placement bottom-start :z-index 50 :visibility hidden
:width (ch 26) :height (lh 3) :background-color "#153F4A" :color "#FFFFFF" :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 (box :id "menu-sage" :padding-inline (ch 1) :pointer hand
:hover-style (:background-color "#407E5C") :hover-style (:background-color "#407E5C")
:help-echo "Choose sage, update the result, and close the menu." :help-echo "Choose sage, update the result, and close the menu."

View File

@ -54,7 +54,10 @@
(defun ebox-playground-layer-test--parity () (defun ebox-playground-layer-test--parity ()
"Compare native paint and interactions with the committed snapshot render." "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)))) (fresh (ebox-render (plist-get snapshot :input))))
(should (ebox-canonical-input-p (plist-get snapshot :input))) (should (ebox-canonical-input-p (plist-get snapshot :input)))
(should (should