branch: externals/nano-theme commit 7ae6bd1204465b4a26ee625636006e4dba4deca2 Author: Nicolas P. Rougier <nicolas.roug...@inria.fr> Commit: Nicolas P. Rougier <nicolas.roug...@inria.fr>
Tentative fix for light & dark frames (take 2) --- nano-theme.el | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/nano-theme.el b/nano-theme.el index 6f5cc47324..38aeaff552 100644 --- a/nano-theme.el +++ b/nano-theme.el @@ -498,29 +498,30 @@ background color that is barely perceptible." (defun nano-theme (mode) "Apply the nano theme according to MODE which can be 'dark or 'light." + (message (format "Theme applied: %s" mode)) + (let ((light '((background light))) (dark '((background dark))) (theme (if (eq mode 'dark) 'nano-dark 'nano-light))) - - - ;; (add-to-list 'default-frame-alist `(background-mode . ,mode)) - (add-to-list 'default-frame-alist `(background-color . ,(if (eq mode 'light) - nano-light-background - nano-dark-background))) - (add-to-list 'default-frame-alist `(foreground-color . ,(if (eq mode 'light) - nano-light-foreground - nano-dark-foreground))) + (add-to-list 'default-frame-alist `(background-mode . ,mode)) + (add-to-list 'default-frame-alist `(background-color . ,(if (eq mode 'light) + nano-light-background + nano-dark-background))) + (add-to-list 'default-frame-alist `(foreground-color . ,(if (eq mode 'light) + nano-light-foreground + nano-dark-foreground))) (custom-set-variables '(widget-image-enable nil) '(x-underline-at-descent-line t)) - (set-frame-parameter nil 'background-mode mode) -;; (setq frame-background-mode mode) -;; (setq nano-theme--current mode) -;; (frame-set-background-mode (selected-frame)) + ;; (set-frame-parameter nil 'background-mode mode) + (setq frame-background-mode mode) + (frame-set-background-mode (selected-frame)) + ;; (setq nano-theme--current mode) + ;; (frame-set-background-mode (selected-frame)) (when nano-fonts-use (custom-theme-set-faces theme