Skip to content

Commit

Permalink
Simple acm-icon function, remove unnecessary argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
manateelazycat committed Oct 25, 2023
1 parent 2685bc8 commit 025bcf4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions acm/acm-icon.el
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ If COLOR-NAME is unknown to Emacs, then return COLOR-NAME as-is."
(apply #'color-rgb-to-hex (append rgb-color '(2)))
color-name)))

(defun acm-icon (collection name &optional fg-color bg-color zoom)
(defun acm-icon (collection name &optional fg-color bg-color)
(let* ((root (acm-icon-parse collection name))

;; Read original viewbox
Expand All @@ -212,11 +212,6 @@ If COLOR-NAME is unknown to Emacs, then return COLOR-NAME as-is."
(svg-width (* (window-font-width) acm-icon-width))
(svg-height (* (window-font-height) 1))

;; Zoom the icon by using integer factor only
(zoom (max 1 (truncate (or zoom 1))))
(svg-width (* svg-width zoom))
(svg-height (* svg-height zoom))

(svg-viewbox (format "%f %f %f %f" view-x view-y view-width view-height))
(fg-color (acm-icon-convert-to-svg-color
(or (when (facep fg-color)
Expand Down
2 changes: 1 addition & 1 deletion acm/acm.el
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ The key of candidate will change between two LSP results."
(dolist (v items)
(let* ((icon (cdr (assoc (downcase (plist-get v :icon)) acm-icon-alist)))
(icon-default (cdr (assoc t acm-icon-alist)))
(display-icon (if icon icon icon-default))
(display-icon (or icon icon-default))
(candidate (plist-get v :display-label))
(annotation (plist-get v :annotation))
(annotation-text (format "%s " (capitalize (if annotation annotation ""))))
Expand Down

0 comments on commit 025bcf4

Please sign in to comment.