GNU bug report logs - #73248
[macOS] `ns-transparent-titlebar` gives black-on-black text with dark themes

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefankangas <at> gmail.com>

Date: Sat, 14 Sep 2024 13:00:02 UTC

Severity: minor

Full log


View this message in rfc822 format

From: Stefan Kangas <stefankangas <at> gmail.com>
To: 73248 <at> debbugs.gnu.org
Cc: Steve Purcell <steve <at> sanityinc.com>, Alan Third <alan <at> idiocy.org>
Subject: bug#73248: [macOS] `ns-transparent-titlebar` gives black-on-black text with dark themes
Date: Sat, 14 Sep 2024 05:58:55 -0700
Severity: minor

When using (some?) dark themes with `ns-transparent-titlebar` set to t
on macOS, you get black-on-black text in the titlebar.

To reproduce the bug, evaluate this in emacs -Q:

   (progn (load-theme 'modus-vivendi)
          (modify-frame-parameters
           nil '((ns-transparent-titlebar . t))))

The black-on-black text disappear when evaluating this:

    (modify-frame-parameters
     nil `((ns-transparent-titlebar . t)
           (ns-appearance . ,(frame-parameter nil 'background-mode))))

However, this now gives white-on-white text when you switch to a light
theme (for example `M-x load-theme RET modus-operandi RET`).

There is a package that attempts to solve this by updating
`ns-appearance` dynamically depending on the theme:

    https://github.com/purcell/ns-auto-titlebar

However, this just seems like a work-around for a plain bug.

I wonder if there is any reason why `ns-transparent-titlebar` set to t
can't just make it work as if `ns-appearance` was set to something like
this:

    (ns-appearance . ,(frame-parameter nil 'background-mode))

FWIW, here's a recipe to try the `ns-auto-titlebar` package:

    emacs -Q --eval "(progn (package-initialize) \
        (use-package ns-auto-titlebar :ensure t \
            :config (ns-auto-titlebar-mode)) \
        (load-theme 'modus-vivendi))"




This bug report was last modified 274 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.