Skip to content

Commit

Permalink
help: Update panel-buffer style when theme changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
hgluka committed Sep 5, 2023
1 parent 87c0b5a commit 8ea9b05
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions source/help.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,29 @@ Note that some settings may require restarting Nyxt to take effect.")
(theme:accent-color (symbol-value theme-symbol))
(theme:on-accent-color (symbol-value theme-symbol)))
`(nyxt/setting::apply-generic-setting 'nyxt/setting::browser-generic-setting
(lambda (browser-instance)
(setf (theme browser-instance) ,theme-symbol)
(mapc (lambda (window-instance)
(setf (style (status-buffer window-instance))
(lambda (browser)
(setf (theme browser) ,theme-symbol)
(mapc (lambda (window)
(mapc (lambda (panel)
(setf (style panel)
(apply (closer-mop:slot-definition-initfunction (mopu:get-slot-definition 'panel-buffer 'style))
nil))
(reload-buffer panel))
(panel-buffers window))
(setf (style (status-buffer window))
(apply (closer-mop:slot-definition-initfunction (mopu:get-slot-definition 'status-buffer 'style))
nil))
(setf (message-buffer-style window-instance)
(setf (message-buffer-style window)
(apply (closer-mop:slot-definition-initfunction (mopu:get-slot-definition 'window 'message-buffer-style))
nil)))
(alex:hash-table-values (windows browser-instance)))
(mapc (lambda (buffer-instance)
(when (internal-page-p (url buffer-instance))
(setf (style buffer-instance)
(alex:hash-table-values (windows browser)))
(mapc (lambda (buffer)
(when (internal-url-p (url buffer))
(setf (style buffer)
(apply (closer-mop:slot-definition-initfunction (mopu:get-slot-definition 'web-buffer 'style))
nil))
(buffer-load (url buffer-instance)
:buffer buffer-instance)))
(alex:hash-table-values (buffers browser-instance)))
(reload-buffer buffer)))
(alex:hash-table-values (buffers browser)))
(print-status)
(echo "Theme changed."))))
(:p "Colors:")
Expand Down

0 comments on commit 8ea9b05

Please sign in to comment.