From: Po Lu <luangruo@yahoo.com>
Date: Fri, 28 Apr 2023 06:43:31 +0000 (+0800)
Subject: Make mode-line behavior better with grayscale visuals
X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a57a8b75f50bca3b724d3f49c87aba7a9121bf13;p=emacs.git

Make mode-line behavior better with grayscale visuals

* lisp/faces.el (mode-line, mode-line-inactive)
(mode-line-highlight): Enable gray faces on grayscale visuals.
---

diff --git a/lisp/faces.el b/lisp/faces.el
index 8bf7e4429d9..739e5bdf310 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -2696,7 +2696,7 @@ non-nil."
   :version "22.1")
 
 (defface mode-line
-  '((((class color) (min-colors 88))
+  '((((class color grayscale) (min-colors 88))
      :box (:line-width -1 :style released-button)
      :background "grey75" :foreground "black")
     (t
@@ -2719,11 +2719,11 @@ This inherits from the `mode-line' face."
 (defface mode-line-inactive
   '((default
      :inherit mode-line)
-    (((class color) (min-colors 88) (background light))
+    (((class color grayscale) (min-colors 88) (background light))
      :weight light
      :box (:line-width -1 :color "grey75" :style nil)
      :foreground "grey20" :background "grey90")
-    (((class color) (min-colors 88) (background dark) )
+    (((class color grayscale) (min-colors 88) (background dark) )
      :weight light
      :box (:line-width -1 :color "grey40" :style nil)
      :foreground "grey80" :background "grey30"))
@@ -2733,7 +2733,7 @@ This inherits from the `mode-line' face."
   :group 'basic-faces)
 
 (defface mode-line-highlight
-  '((((supports :box t) (class color) (min-colors 88))
+  '((((supports :box t) (class color grayscale) (min-colors 88))
      :box (:line-width 2 :color "grey40" :style released-button))
     (t
      :inherit highlight))