From c96b27452de5fa0aac72dea7233ea4d34d948f38 Mon Sep 17 00:00:00 2001 From: MitchMarq42 Date: Sun, 6 Aug 2023 18:27:46 -0800 Subject: [PATCH] Use `shr` because string-pixel-width --- notibox.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/notibox.el b/notibox.el index d23aca0..368554c 100644 --- a/notibox.el +++ b/notibox.el @@ -31,6 +31,7 @@ (require 'posframe) (require 'alert) +(require 'shr) ;for `shr-string-pixel-width' (defvar notibox-width 40) ; characters (defvar notibox-height 4) ; characters @@ -48,7 +49,7 @@ (defun notibox--get-position () "Return the starting coordinate at which to place the notibox, as cons." (let* ((parent-width (frame-pixel-width)) - (child-width (* notibox-width (string-pixel-width " "))) + (child-width (* notibox-width (shr-string-pixel-width " "))) (parent-height (frame-pixel-height)) (child-height (* notibox-height (line-pixel-height)))) (pcase notibox-corner