]> code.delx.au - gnu-emacs-elpa/commitdiff
Make the minibuffer faces look nicer
authorOleh Krehel <ohwoeowho@gmail.com>
Mon, 7 Sep 2015 12:03:08 +0000 (14:03 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Mon, 7 Sep 2015 12:03:08 +0000 (14:03 +0200)
* ivy.el (ivy-current-match): Update background and add white
  foreground for light themes. Update background and add black
  foreground for dark themes.
(ivy--add-face): If a face has an explicit foreground, add it ahead,
with no blending. Blend the background as usual.

* swiper.el (swiper-minibuffer-match-face-1):
(swiper-minibuffer-match-face-2): Update the background for light
  themes.
(swiper-minibuffer-match-face-4): Update the background for dark themes.

ivy.el
swiper.el

diff --git a/ivy.el b/ivy.el
index c5a26edbac61d69e783ff756630a27a441f35528..fd3543aeddb8d0c18b726665773747a5fef92bd9 100644 (file)
--- a/ivy.el
+++ b/ivy.el
   :group 'convenience)
 
 (defface ivy-current-match
-  '((t (:inherit highlight)))
+  '((((class color) (background light))
+     :background "#1a4b77" :foreground "white")
+    (((class color) (background dark))
+     :background "#65a7e2" :foreground "black"))
   "Face used by Ivy for highlighting first match.")
 
 (defface ivy-confirm-face
@@ -1408,7 +1411,15 @@ all of the text contained in the minibuffer."
 `propertize' or `add-face-text-property' in this case."
   (require 'colir)
   (condition-case nil
-      (colir-blend-face-background 0 (length str) face str)
+      (progn
+        (colir-blend-face-background 0 (length str) face str)
+        (let ((foreground (face-foreground face)))
+          (when foreground
+            (add-face-text-property
+             0 (length str)
+             `(:foreground ,foreground)
+             nil
+             str))))
     (error
      (ignore-errors
        (font-lock-append-text-property 0 (length str) 'face face str))))
index 0de97e7c6586cf45c755b6fb66afdd13cb4da6ab..ae8a9edd431222333bcce0c153068c8429d6a139 100644 (file)
--- a/swiper.el
+++ b/swiper.el
@@ -63,7 +63,7 @@
 
 (defface swiper-minibuffer-match-face-1
   '((((class color) (background light))
-     :background "#dddddd")
+     :background "#d3d3d3")
     (((class color) (background dark))
      :background "#555555"))
   "The background face for `swiper' minibuffer matches."
@@ -71,7 +71,7 @@
 
 (defface swiper-minibuffer-match-face-2
   '((((class color) (background light))
-     :background "#bbbbbb" :weight bold)
+     :background "#e99ce8" :weight bold)
     (((class color) (background dark))
      :background "#777777" :weight bold))
   "Face for `swiper' minibuffer matches modulo 1.")
@@ -87,7 +87,7 @@
   '((((class color) (background light))
      :background "#ffbbff" :weight bold)
     (((class color) (background dark))
-     :background "#ff77ff" :weight bold))
+     :background "#8a498a" :weight bold))
   "Face for `swiper' minibuffer matches modulo 3.")
 
 (defface swiper-line-face