From 26726e092beb0851743c3fb046e82ce323d818e6 Mon Sep 17 00:00:00 2001 From: jao Date: Sun, 13 Nov 2022 21:12:51 +0000 Subject: similar take on centering the center --- src/Xmobar/Draw/Cairo.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Xmobar/Draw/Cairo.hs b/src/Xmobar/Draw/Cairo.hs index af48133..833935d 100644 --- a/src/Xmobar/Draw/Cairo.hs +++ b/src/Xmobar/Draw/Cairo.hs @@ -182,7 +182,7 @@ drawSegments dctx surf = do cstart = (dw - cw) / 2.0 (cend, as', bx') <- foldM (drawSegment dctx surf dw) (cstart, as, bx) clyts let rstart' = dw - rw - 1 - rstart = if cw > 0 then max rstart' (cend + 1) else rstart' + rstart = if cend > cstart then max rstart' (cend + 1) else rstart' (_, as'', bx'') <- foldM (drawSegment dctx surf dw) (rstart, as', bx') rlyts drawBoxes dctx surf (reverse bx'') when (C.borderWidth conf > 0) (drawBorder conf dw dh surf) -- cgit v1.2.3