From: Matt Armstrong Date: Fri, 28 Oct 2016 22:31:42 +0000 (-0700) Subject: emacs: make faces readable on dark backgrounds. X-Git-Tag: 0.24_rc0~100 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=d62f9dbfc0722d16f4b3a8801967e040c2033ff4 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. --- 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.