diff --git a/cl-tty.asd b/cl-tty.asd index e4c5184..3ea8b13 100644 --- a/cl-tty.asd +++ b/cl-tty.asd @@ -68,12 +68,12 @@ (:file "render-tests") (:file "theme-tests") (:file "input-tests") - (:file "scrollbox-tabbar-tests" :pathname "../../tests/scrollbox-tabbar-tests.lisp") - (:file "select-tests" :pathname "../../tests/select-tests.lisp") - (:file "markdown-tests" :pathname "../../tests/markdown-tests.lisp") - (:file "dialog-tests" :pathname "../../tests/dialog-tests.lisp") - (:file "mouse-tests" :pathname "../../tests/mouse-tests.lisp") - (:file "slot-tests" :pathname "../../tests/slot-tests.lisp")))) + (:file "scrollbox-tabbar-tests" :pathname "../../tests/scrollbox-tabbar-tests") + (:file "select-tests" :pathname "../../tests/select-tests") + (:file "markdown-tests" :pathname "../../tests/markdown-tests") + (:file "dialog-tests" :pathname "../../tests/dialog-tests") + (:file "mouse-tests" :pathname "../../tests/mouse-tests") + (:file "slot-tests" :pathname "../../tests/slot-tests")))) :perform (test-op (o c) (let ((run (find-symbol "RUN" :fiveam)) (explain (find-symbol "EXPLAIN!" :fiveam))) diff --git a/layout/layout.lisp b/layout/layout.lisp index 2c03cef..d71f569 100644 --- a/layout/layout.lisp +++ b/layout/layout.lisp @@ -19,9 +19,9 @@ (in-package :cl-tty.layout) (defun normalize-box (spec) - (cond ((null spec) '(:top 0 :right 0 :bottom 0 :left 0)) - ((numberp spec) `(:top ,spec :right ,spec :bottom ,spec :left ,spec)) - (t (loop with result = '(:top 0 :right 0 :bottom 0 :left 0) + (cond ((null spec) (list :top 0 :right 0 :bottom 0 :left 0)) + ((numberp spec) (list :top spec :right spec :bottom spec :left spec)) + (t (loop with result = (list :top 0 :right 0 :bottom 0 :left 0) for (key val) on spec by #'cddr do (setf (getf result key) val) finally (return result))))) @@ -39,8 +39,8 @@ (direction :initform :column :initarg :direction :accessor layout-node-direction) (grow :initform 0 :initarg :grow :accessor layout-node-grow) (shrink :initform 1 :initarg :shrink :accessor layout-node-shrink) - (padding :initform '(:top 0 :right 0 :bottom 0 :left 0) :initarg :padding :accessor layout-node-padding) - (margin :initform '(:top 0 :right 0 :bottom 0 :left 0) :initarg :margin :accessor layout-node-margin) + (padding :initform (list :top 0 :right 0 :bottom 0 :left 0) :initarg :padding :accessor layout-node-padding) + (margin :initform (list :top 0 :right 0 :bottom 0 :left 0) :initarg :margin :accessor layout-node-margin) (gap :initform 0 :initarg :gap :accessor layout-node-gap) (position-type :initform :relative :initarg :position-type :accessor layout-node-position-type) (position-offset :initform nil :initarg :position-offset :accessor layout-node-position-offset)