From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#73248: [macOS] `ns-transparent-titlebar` gives black-on-black text with dark themes Date: Sat, 14 Sep 2024 05:58:55 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30574"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Steve Purcell , Alan Third To: 73248@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 14 15:00:12 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1spSNn-0007pg-2y for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Sep 2024 15:00:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1spSNX-0005cm-Uo; Sat, 14 Sep 2024 08:59:56 -0400 Original-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 ) id 1spSNW-0005bg-TW for bug-gnu-emacs@gnu.org; Sat, 14 Sep 2024 08:59:54 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1spSNW-0007mI-Ja for bug-gnu-emacs@gnu.org; Sat, 14 Sep 2024 08:59:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:MIME-Version:From:To:Subject; bh=xBsGWqPkAmFgn0kVGDZiR32vy2ymA5gf5cpNJVffv+g=; b=KJKArW9CmT5Z1b7JVN90hJMZ1DYIVbEAHDxOZ0+QGTzxJF2/xrsEZkBkqUSg9ccio92C67ZIMp09yPop0Vj/hkXXdEr+A7BQLp6QJBImP0fFrpjTyJ/6Y4RaF/h6VQLLVr2pgQClgOOquRXp92fvLc1qjsVW0EFlM2iFcor177jPDEwE3vpTp6FycEY4/l4TDpNFgDMr+VXt8uzRtYsHGZB+q3PwdvcQjGEH7Hdo8JhLKY3fXpxZRZdnsiiNykKVqxdlTerJ28yr9htjrOox3gfEgcPW3pBwWpPTrsUDCtzBkApAVQglnunlCQQiB5DNDfQcLtHHd8PsL6FTLvbitw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1spSNe-0004Dv-Fe; Sat, 14 Sep 2024 09:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: steve@sanityinc.com, alan@idiocy.org, bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Sep 2024 13:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73248 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: Steve Purcell , Alan Third Original-Received: via spool by submit@debbugs.gnu.org id=B.172631876016130 (code B ref -1); Sat, 14 Sep 2024 13:00:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Sep 2024 12:59:20 +0000 Original-Received: from localhost ([127.0.0.1]:45061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spSMx-0004C6-Iz for submit@debbugs.gnu.org; Sat, 14 Sep 2024 08:59:19 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:53376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spSMu-0004Bx-Dw for submit@debbugs.gnu.org; Sat, 14 Sep 2024 08:59:19 -0400 Original-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 ) id 1spSMg-0004xU-Pc for bug-gnu-emacs@gnu.org; Sat, 14 Sep 2024 08:59:03 -0400 Original-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 ) id 1spSMd-0007hN-32 for bug-gnu-emacs@gnu.org; Sat, 14 Sep 2024 08:59:01 -0400 Original-Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5c26311c6f0so4026875a12.3 for ; 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) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 14 Sep 2024 05:58:55 -0700 Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=stefankangas@gmail.com; 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:291740 Archived-At: 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))"