[PATCH v3] emacs: make faces readable on dark backgrounds.
Matt Armstrong
marmstrong at google.com
Fri Oct 28 15:31:42 PDT 2016
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 e376aa8..68a7e9f 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 1b2ce5c..09d182d 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 2fc72b7..c0e9e1d 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.8.0.rc3.226.g39d4020
More information about the notmuch
mailing list