From d62f9dbfc0722d16f4b3a8801967e040c2033ff4 Mon Sep 17 00:00:00 2001 From: Matt Armstrong Date: Fri, 28 Oct 2016 15:31:42 -0700 Subject: [PATCH] emacs: make faces readable on dark backgrounds. The notmuch-tag-flagged, notmuch-search-flagged-face and notmuch-crypto-part-header faces defaulted to "blue", which is nearly unreadable when a dark background is in use. This is addressed by using "LightBlue1" for dark backgrounds. As a side effect, these faces are now no-op definitions for grayscale or mono displays. --- emacs/notmuch-crypto.el | 7 ++++++- emacs/notmuch-tag.el | 7 ++++++- emacs/notmuch.el | 6 +++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-crypto.el b/emacs/notmuch-crypto.el index e376aa80..68a7e9f3 100644 --- a/emacs/notmuch-crypto.el +++ b/emacs/notmuch-crypto.el @@ -42,7 +42,12 @@ mode." :group 'notmuch-crypto) (defface notmuch-crypto-part-header - '((t (:foreground "blue"))) + '((((class color) + (background dark)) + (:foreground "LightBlue1")) + (((class color) + (background light)) + (:foreground "blue"))) "Face used for crypto parts headers." :group 'notmuch-crypto :group 'notmuch-faces) diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el index 1b2ce5c2..09d182df 100644 --- a/emacs/notmuch-tag.el +++ b/emacs/notmuch-tag.el @@ -115,7 +115,12 @@ Used in the default value of `notmuch-tag-formats`." :group 'notmuch-faces) (defface notmuch-tag-flagged - '((t :foreground "blue")) + '((((class color) + (background dark)) + (:foreground "LightBlue1")) + (((class color) + (background light)) + (:foreground "blue"))) "Face used for the flagged tag. Used in the default value of `notmuch-tag-formats`." diff --git a/emacs/notmuch.el b/emacs/notmuch.el index ef4bb2b1..44519b7a 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -313,7 +313,11 @@ there will be called at other points of notmuch execution." :group 'notmuch-faces) (defface notmuch-search-flagged-face - '((t + '((((class color) + (background dark)) + (:foreground "LightBlue1")) + (((class color) + (background light)) (:foreground "blue"))) "Face used in search mode face for flagged threads. -- 2.43.0