[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/kind-icon 4d26e8f896 1/4: Support for background-less i
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/kind-icon 4d26e8f896 1/4: Support for background-less icons |
|
Date: |
Sun, 26 Nov 2023 15:58:00 -0500 (EST) |
branch: externals/kind-icon
commit 4d26e8f8962647e47b3dc32d45cd8dec87676dbd
Author: JD Smith <93749+jdtsmith@users.noreply.github.com>
Commit: JD Smith <93749+jdtsmith@users.noreply.github.com>
Support for background-less icons
Requires support from svg-lib; see
https://github.com/rougier/svg-lib/issues/34
---
kind-icon.el | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/kind-icon.el b/kind-icon.el
index 9ea16d8644..d547537ceb 100644
--- a/kind-icon.el
+++ b/kind-icon.el
@@ -195,7 +195,7 @@ otherwise defaulting to the frame background color."
:set #'kind-icon--set-default-clear-cache)
(defcustom kind-icon-default-style
- '(:padding 0 :stroke 0 :margin 0 :radius 0 :height 1.0 :scale 1.0)
+ '(:padding 0 :stroke 0 :margin 0 :radius 0 :height 1.0 :scale 1.0
:background nil)
"Default style parameters for building SVG icons.
See `svg-lib-style-compute-default'."
:group 'kind-icon
@@ -213,7 +213,7 @@ value pairs to provide to `svg-lib-icon'."
(apply #'svg-lib-icon icon plist
`(,@kind-icon-default-style
,@(if col `(:foreground ,col))
- ,@(if bg-col `(:background ,bg-col))))
+ :background ,bg-col)) ; nil = transparent
((error)
(warn "Error retrieving icon %s, falling back on short-text\n%s"
icon (cdr err))
@@ -316,8 +316,7 @@ background-color."
(color-name-to-rgb default-bg)
kind-icon-blend-frac)
(if (and kind-face-bg (not (eq kind-face-bg
'unspecified)))
- kind-face-bg
- default-bg)))
+ kind-face-bg)))
(half (/ dfw 2)) ; integer division, may truncate
(face-spec `(:weight bold :foreground ,col :background
,bg-col))
(pad-right (propertize " " 'display `(space :width (,half))