1
0
Fork 0

- [gemini] rendered again the focus mark when a gemini stream has ended.

This commit is contained in:
cage 2022-03-11 20:50:06 +01:00
parent a34cc83df5
commit baffa09093
4 changed files with 15 additions and 9 deletions

View File

@ -370,6 +370,10 @@
(maybe-render-toc ()
(when (eq (stream-status wrapper-object) :rendering)
(ui:open-gemini-toc)))
(maybe-render-focus-mark ()
(when (eq (stream-status wrapper-object) :rendering)
(program-events:with-enqueued-process ()
(windows:draw-focus-mark *message-window*))))
(maybe-render-links ()
(when (eq (stream-status wrapper-object) :rendering)
(program-events:with-enqueued-process ()
@ -448,6 +452,7 @@
(progn
(maybe-render-toc)
(maybe-render-links)
(maybe-render-focus-mark)
(ui:notify (_ "Gemini document downloading completed"))
(setf (stream-status wrapper-object) :completed)
(when (and fragment

View File

@ -218,13 +218,10 @@
(slowness 15))
(declare (fixnum index frames slowness))
(defun draw-downloading-animation (window)
(declare (optimize (debug 0) (speed 2)))
(declare (optimize (debug 0) (speed 3)))
(let* ((animation-frames (swconf:gemini-downloading-animation))
(max (length (the list animation-frames))))
(print-text window
(elt animation-frames index)
0 0
:attributes (attribute-bold))
(print-text window (elt animation-frames index) 0 0 :attributes (attribute-bold))
(incf frames)
(when (= (rem frames slowness)
0)

View File

@ -1824,6 +1824,7 @@
:focus-marked-window
:in-focus
:in-focus-p
:draw-focus-mark
:border-window
:uses-border-p
:usable-window-width

View File

@ -716,11 +716,14 @@ insetred by the user"
(setf (focus-mark object)
(make-tui-string value :fgcolor fg :bgcolor bg))))
(defmethod draw :after ((object focus-marked-window))
(definline draw-focus-mark (window)
(with-accessors ((in-focus-p in-focus-p)
(focus-mark focus-mark)) object
(when (in-focus-p object)
(print-text object focus-mark 0 0))))
(focus-mark focus-mark)) window
(when (in-focus-p window)
(print-text window focus-mark 0 0))))
(defmethod draw :after ((object focus-marked-window))
(draw-focus-mark object))
(defclass border-window ()
((uses-border-p