auto sizing and colorization of command

This commit is contained in:
David Botton 2021-03-11 22:33:09 -05:00
parent 4c533e8cbc
commit 7f9f3c4b23

View file

@ -42,9 +42,10 @@
(declare (ignore obj))
(handler-case
(progn
(setf (inner-html results-section)
(format nil "~A<br>~A"
(setf (inner-html results-section)
(format nil "~A<br><span style='color:blue'>~A</span><br>~A"
(inner-html results-section)
(value command)
(lf-to-br (uiop/run-program:run-program
(value command)
:force-shell t :output :string))))
@ -55,7 +56,14 @@
(setf (value command) ""))))
(setf (overflow results-section) :scroll)
(set-border results-section :thin :solid :black)
(setf (height results-section) (unit :px 500)))
(flet ((set-height ()
(setf (height results-section) (- (inner-height (window body))
(height command-section)
20))))
(set-height)
(set-on-resize (window body) (lambda (obj)
(declare (ignore obj))
(set-height)))))
(run body))
(defun start-tutorial ()