icons instead of buttons

This commit is contained in:
David Botton 2022-06-24 11:28:47 -04:00
parent 94b3e6768c
commit 5ab5179435
18 changed files with 44 additions and 31 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 696 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 B

View file

@ -1016,21 +1016,32 @@ of controls and double click to select control."
:client-movement t))
(box (create-panel-box-layout (window-content win)
:left-width 0 :right-width 0
:top-height 30 :bottom-height 0))
(tool-bar (top-panel box))
(btn-del (create-button tool-bar :content "Del"))
(btn-copy (create-button tool-bar :content "Copy"))
(btn-paste (create-button tool-bar :content "Paste"))
(btn-sim (create-button tool-bar :content "Sim"))
(btn-test (create-button tool-bar :content "Run"))
(btn-rndr (create-button tool-bar :content "Rndr"))
(btn-save (create-button tool-bar :content "Save"))
(btn-load (create-button tool-bar :content "Load"))
:top-height 33 :bottom-height 0))
(tool-bar (create-div (top-panel box) :class "w3-center"))
(btn-class "w3-button w3-white w3-border w3-border-black")
(btn-copy (create-img tool-bar :alt-text "copy" :url-src "/img/icons/copy.png" :class btn-class))
(btn-paste (create-img tool-bar :alt-text "paste" :url-src "/img/icons/paste.png" :class btn-class))
(btn-cut (create-img tool-bar :alt-text "cut" :url-src "/img/icons/cut.png" :class btn-class))
(btn-del (create-img tool-bar :alt-text "delete" :url-src "/img/icons/delete.png" :class btn-class))
;;(btn-sim (create-button tool-bar :content "Sim"))
(btn-test (create-img tool-bar :alt-text "test" :url-src "/img/icons/run.png" :class btn-class))
(btn-rndr (create-img tool-bar :alt-text "render" :url-src "/img/icons/rndr.png" :class btn-class))
(btn-save (create-img tool-bar :alt-text "save" :url-src "/img/icons/save.png" :class btn-class))
(btn-load (create-img tool-bar :alt-text "load" :url-src "/img/icons/open.png" :class btn-class))
(content (center-panel box))
(in-simulation nil)
(file-name "")
(render-file-name "")
(panel-id (html-id content)))
(setf (background-color (top-panel box)) :black)
(setf (height btn-copy) "12px")
(setf (height btn-paste) "12px")
(setf (height btn-cut) "12px")
(setf (height btn-del) "12px")
(setf (height btn-test) "12px")
(setf (height btn-rndr) "12px")
(setf (height btn-save) "12px")
(setf (height btn-load) "12px")
(setf-next-id content 1)
(setf (overflow content) :auto)
(init-control-list app panel-id)
@ -1041,7 +1052,6 @@ of controls and double click to select control."
(setf (attribute content "data-clog-type") "clog-data")
(setf (attribute content "data-in-package") "clog-user")
(setf (attribute content "data-custom-slots") "")
(setf (background-color tool-bar) :silver)
;; activate associated windows on open
(on-populate-control-properties-win content :win win)
(on-populate-control-list-win content)
@ -1127,26 +1137,29 @@ of controls and double click to select control."
(set-on-click btn-del #'del)
(set-on-cut content (lambda (obj)
(copy obj)
(del obj))))
(set-on-click btn-sim (lambda (obj)
(declare (ignore obj))
(cond (in-simulation
(setf (text btn-sim) "Simulate")
(setf in-simulation nil)
(maphash (lambda (html-id control)
(declare (ignore html-id))
(setf (hiddenp (get-placer control)) nil))
(get-control-list app panel-id)))
(t
(setf (text btn-sim) "Develop")
(deselect-current-control app)
(on-populate-control-properties-win content :win win)
(setf in-simulation t)
(maphash (lambda (html-id control)
(declare (ignore html-id))
(setf (hiddenp (get-placer control)) t))
(get-control-list app panel-id))
(focus (first-child content))))))
(del obj)))
(set-on-click btn-cut (lambda (obj)
(copy obj)
(del obj))))
;; (set-on-click btn-sim (lambda (obj)
;; (declare (ignore obj))
;; (cond (in-simulation
;; (setf (text btn-sim) "Simulate")
;; (setf in-simulation nil)
;; (maphash (lambda (html-id control)
;; (declare (ignore html-id))
;; (setf (hiddenp (get-placer control)) nil))
;; (get-control-list app panel-id)))
;; (t
;; (setf (text btn-sim) "Develop")
;; (deselect-current-control app)
;; (on-populate-control-properties-win content :win win)
;; (setf in-simulation t)
;; (maphash (lambda (html-id control)
;; (declare (ignore html-id))
;; (setf (hiddenp (get-placer control)) t))
;; (get-control-list app panel-id))
;; (focus (first-child content))))))
(set-on-click btn-load (lambda (obj)
(server-file-dialog obj "Load Panel" file-name
(lambda (fname)