diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/auto-dim-config.el | 15 | ||||
| -rw-r--r-- | modules/dashboard-config.el | 13 |
2 files changed, 24 insertions, 4 deletions
diff --git a/modules/auto-dim-config.el b/modules/auto-dim-config.el index e538e523..ebda92c2 100644 --- a/modules/auto-dim-config.el +++ b/modules/auto-dim-config.el @@ -192,6 +192,19 @@ the fallback that makes vterm repaint after auto-dim changes window state." (setq cj/auto-dim--last-selected-window (selected-window)) (cj/auto-dim--schedule-vterm-refresh)) +(defun cj/auto-dim--never-dim-dashboard-p (buffer) + "Return non-nil when BUFFER is the dashboard, so it stays lit. +The dashboard banner is a transparent PNG. On this non-pgtk build Emacs +composites image alpha against one background color at render time and +caches the flat pixmap; it can't re-blend when dimming remaps the +background to the near-black `auto-dim-other-buffers' face, so the +transparent edges show a baked-in rectangle in a dimmed dashboard. Live +alpha would need a pgtk build, ruled out by its fractional-scaling input +lag. Exempting just this one short-lived buffer keeps the fix local -- +every other approach changes dimming for all buffers. The cost is no +focus cue on a split-displayed dashboard, accepted as a fair trade." + (equal (buffer-name buffer) "*dashboard*")) + (use-package auto-dim-other-buffers :load-path "~/code/auto-dim-other-buffers.el" :ensure nil @@ -242,6 +255,8 @@ the fallback that makes vterm repaint after auto-dim changes window state." (dupre-org-priority-b . (dupre-org-priority-b-dim . nil)) (dupre-org-priority-c . (dupre-org-priority-c-dim . nil)) (dupre-org-priority-d . (dupre-org-priority-d-dim . nil)))) + (add-hook 'auto-dim-other-buffers-never-dim-buffer-functions + #'cj/auto-dim--never-dim-dashboard-p) (auto-dim-other-buffers-mode 1)) (with-eval-after-load 'vterm diff --git a/modules/dashboard-config.el b/modules/dashboard-config.el index ac511b5b..571eb58a 100644 --- a/modules/dashboard-config.el +++ b/modules/dashboard-config.el @@ -171,11 +171,16 @@ window." :config ;; == banner - ;; Set image props before `dashboard-setup-startup-hook' can build the - ;; dashboard buffer; otherwise the startup image descriptor may miss the - ;; transparency mask. + ;; The banner is an RGBA PNG with real transparency. On this non-pgtk build + ;; Emacs composites the alpha against one solid background color at render + ;; time and caches the flat pixmap -- it can't re-blend against a window + ;; background that changes later. The dashboard is exempt from dimming (see + ;; the never-dim predicate in auto-dim-config.el), so its background stays at + ;; the theme color in every window. That makes the constant face background + ;; the right thing to composite against -- no :mask and no forced :background + ;; needed; the native alpha over the theme background leaves the transparent + ;; edges seamless. (setq dashboard-startup-banner (concat user-emacs-directory "assets/M-x_butterfly.png")) - (setq dashboard-image-extra-props '(:mask heuristic)) (setq dashboard-banner-logo-title "Emacs: The Editor That Saves Your Soul") ;; == general |
