1
0
Fork 0

- [GUI] added visual hint that the process of inlining an image is in progress.

This commit is contained in:
cage 2023-05-13 12:13:58 +02:00
parent 6b12729128
commit b6bed17984
2 changed files with 21 additions and 19 deletions

View File

@ -93,8 +93,8 @@
(defmacro with-busy* ((root-widget) &body body) (defmacro with-busy* ((root-widget) &body body)
`(progn `(progn
(with-busy (,root-widget) (gui:with-busy (,root-widget)
(with-hourglass ,(list root-widget) (gui:with-hourglass ,(list root-widget)
,@body)))) ,@body))))
(defun password-dialog (parent title message &key (button-message "OK")) (defun password-dialog (parent title message &key (button-message "OK"))

View File

@ -407,8 +407,10 @@
:inline-image)) :inline-image))
(open-inline-callback () (open-inline-callback ()
(if (inline-possible-p link-value) (if (inline-possible-p link-value)
(let* ((file-path (slurp-iri main-window link-value)) (let ((file-path nil))
(image (gui:make-image file-path)) (gui-goodies:with-busy* (main-window)
(setf file-path (slurp-iri main-window link-value)))
(let ((image (gui:make-image file-path))
(coordinates `(+ (:line ,line-count :char 0) 1 :lines))) (coordinates `(+ (:line ,line-count :char 0) 1 :lines)))
(gui:insert-image (gemtext-widget main-window) image coordinates) (gui:insert-image (gemtext-widget main-window) image coordinates)
(with-accessors ((ir-lines ir-lines) (with-accessors ((ir-lines ir-lines)
@ -423,7 +425,7 @@
(setf ir-rendered-lines (setf ir-rendered-lines
(fresh-vector-insert@ ir-lines (fresh-vector-insert@ ir-lines
"" ""
line-count))))) line-count))))))
(funcall (link-click-mouse-1-callback-clsr link-value main-window))))) (funcall (link-click-mouse-1-callback-clsr link-value main-window)))))
(lambda () (lambda ()
(let* ((popup-menu (gui:make-menu nil (_"link menu"))) (let* ((popup-menu (gui:make-menu nil (_"link menu")))