From 38f3230a5d443fd3cd38e77ca3ed4637858c76ff Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Mon, 3 Nov 2025 10:09:36 -0800 Subject: [PATCH] Improve icon sizing Instead of using the frame's char height, set the icon's maximum height relative to the surrounding text. Additionally, center icons on the line (to avoid increasing the line height. --- ednc.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ednc.el b/ednc.el index 2dfd11c..cc07c32 100644 --- a/ednc.el +++ b/ednc.el @@ -312,10 +312,10 @@ This function modifies the notification's hints." (ednc--path-to-image (ednc-notification-app-icon new)) (ednc--data-to-image (ednc--get-hint hints "icon_data" t))))) (when image - (setf (image-property image :max-height) (frame-char-height) - (image-property image :ascent) 90) - (push (cons 'icon (with-temp-buffer (insert-image image) - (buffer-string))) + (setf (image-property image :max-height) '(1.0 . ch) + (image-property image :scale) 1.0 + (image-property image :ascent) 'center) + (push (cons 'icon (propertize " " 'display image)) (ednc-notification-amendments new)))))) (defun ednc--get-hint (hints key &optional remove-flag)