From 0970d7800f7e47658752ada800fead50988783bf Mon Sep 17 00:00:00 2001 From: Miranda Marquez Date: Sun, 20 Oct 2024 09:25:32 -0800 Subject: [PATCH] add primitive accounting for gtk scrollbar width --- notibox.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/notibox.el b/notibox.el index b6e00db..79970cb 100644 --- a/notibox.el +++ b/notibox.el @@ -56,6 +56,10 @@ If STACKDEPTH is non-nil and nonzero, return a position that far down." (let* ( + ;; need to not overlap the gtk scrollbar + (scrollbar-width (or (if (eq x-toolkit-scroll-bars 'gtk) + 30) ; wild guess... + 0)) (stackdepth (or stackdepth 0)) (parent-width (frame-pixel-width)) (child-width (* notibox-width (string-pixel-width " "))) @@ -65,7 +69,8 @@ If STACKDEPTH is non-nil and nonzero, return a position that far down." (x-justify (pcase notibox-corner ((or 'topleft 'bottomleft) notibox-padding) ((or 'topright 'bottomright) - (- parent-width (+ child-width notibox-padding))))) + (- (- parent-width scrollbar-width) + (+ child-width notibox-padding))))) (y-justify (pcase notibox-corner ((or 'topleft 'topright) notibox-padding) ((or 'bottomleft 'bottomright)