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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Stefan Kangas <stefankangas@HIDDEN>; dated Sat, 14 Sep 2024 13:00:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 14 Sep 2024 12:59:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 14 08:59:19 2024
Received: from localhost ([127.0.0.1]:45061 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1spSMx-0004C6-Iz
	for submit <at> debbugs.gnu.org; Sat, 14 Sep 2024 08:59:19 -0400
Received: from lists.gnu.org ([209.51.188.17]:53376)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1spSMu-0004Bx-Dw
 for submit <at> debbugs.gnu.org; Sat, 14 Sep 2024 08:59:19 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <stefankangas@HIDDEN>)
 id 1spSMg-0004xU-Pc
 for bug-gnu-emacs@HIDDEN; Sat, 14 Sep 2024 08:59:03 -0400
Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <stefankangas@HIDDEN>)
 id 1spSMd-0007hN-32
 for bug-gnu-emacs@HIDDEN; Sat, 14 Sep 2024 08:59:01 -0400
Received: by mail-ed1-x52b.google.com with SMTP id
 4fb4d7f45d1cf-5c26311c6f0so4026875a12.3
 for <bug-gnu-emacs@HIDDEN>; Sat, 14 Sep 2024 05:58:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1726318736; x=1726923536; darn=gnu.org;
 h=to:subject:message-id:date:mime-version:from:from:to:cc:subject
 :date:message-id:reply-to;
 bh=xBsGWqPkAmFgn0kVGDZiR32vy2ymA5gf5cpNJVffv+g=;
 b=lwZcpHGpzfZaf9d4xEUDU+MNgv8BVZ+s4Qp6+CQ3XmKwihkCa2GzzuE8TYbXf0hB8v
 uj3fIaf2PiBQISrC5XPPJBwEcrdn9RIYf0/Jw6dZUbkTLT3ryXYIksAdTIqHuWdOiLvf
 8UbMCR9kZWcA9XKPBlcdlzCsyLfE2XmnDIvTrqgUKbaJ4Bypv7zwts9uc++28arTT473
 PQVqOCFfv2YLxbYwqZKs89RobbMFNm1PSzNttqCjrBHf5ILBOAaT4Iybfd4FtapiO9Dy
 m4IXFxHRStdO3IOxd61jeM6N1Qko3lO7oOW086bZTGE3Q+kBAaC49TPHcBTmmALrAJ8f
 uGgg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1726318736; x=1726923536;
 h=to:subject:message-id:date:mime-version:from:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=xBsGWqPkAmFgn0kVGDZiR32vy2ymA5gf5cpNJVffv+g=;
 b=i1X1JUKgbqVJJBCs6f/3//jV/GRKCKPbESxhDmuyYPV8vPf6Xq3wOuP0djjAwiqDdn
 2VgoFha3evL8zgB4f05Q9FCoUw/lJuy6nSV9Ck+Dc6BRLGN2BixPnIQOGR5LNqLnWDc5
 mRq66ceDX4mX54SvLDpMdvsCfX9p4xOAlPvbayzXni4lntG4SzDdHphBdbQF9hu2tZK+
 XvVjWt1ow50OwVSEQ+WxX8KTt+oryaB6GiKOkXoiRYUePXcEivub6JTjPlMi9aI4ukkD
 yOcUfRITR0FLul4jkIt5x+rLmzDJQxuiKCeqBozyJFrNnMpRCr0dVx+Qdi3mH1vcjgjT
 XhUQ==
X-Gm-Message-State: AOJu0Yx7/7vcaO58He9BmrZBQ3FfaMStOfwY/hiDGCOn6Ht2iDzhXdDQ
 pzK85qQMVss8L9zevbPe1pLqj8olH7P53a2OsQmtSaY3LqTGVeyeBI9b54uqbVDP8vbH+LrXKQ1
 /VX8DPAPVTAQDRZzRsr2rL3ZZHtrgkXJjTK4=
X-Google-Smtp-Source: AGHT+IHlHZgC0smbRvHUo0fKb5KjWTpwCfZ5BGMFEY7Zc0smC9eVzQYUb1f/4v0KW3IaWOmbWq6Qg0K77hTDusVqz4Q=
X-Received: by 2002:aa7:da1a:0:b0:5c2:439d:90d4 with SMTP id
 4fb4d7f45d1cf-5c413e5159cmr6228712a12.30.1726318735670; Sat, 14 Sep 2024
 05:58:55 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Sat, 14 Sep 2024 05:58:55 -0700
From: Stefan Kangas <stefankangas@HIDDEN>
X-Debbugs-CC: Steve Purcell <steve@HIDDEN>, Alan Third <alan@HIDDEN>
MIME-Version: 1.0
Date: Sat, 14 Sep 2024 05:58:55 -0700
Message-ID: <CADwFkmmWRCcuB_QCFzEZxdgCemvxrUOf7QA=e_rYLiZg3rU-gw@HIDDEN>
Subject: [macOS] `ns-transparent-titlebar` gives black-on-black text with dark
 themes
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=2a00:1450:4864:20::52b;
 envelope-from=stefankangas@HIDDEN; helo=mail-ed1-x52b.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

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))"




Acknowledgement sent to Stefan Kangas <stefankangas@HIDDEN>:
New bug report received and forwarded. Copy sent to steve@HIDDEN, alan@HIDDEN, bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to steve@HIDDEN, alan@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#73248; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 12 Jan 2025 05:45:02 UTC

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