From 3f7a00defc69f9739c21390f6ba05990ff936b2b Mon Sep 17 00:00:00 2001 From: jao Date: Sat, 10 Dec 2022 19:02:40 +0000 Subject: off by ones --- src/Xmobar/Draw/Cairo.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/Xmobar') diff --git a/src/Xmobar/Draw/Cairo.hs b/src/Xmobar/Draw/Cairo.hs index 48875ee..4a94589 100644 --- a/src/Xmobar/Draw/Cairo.hs +++ b/src/Xmobar/Draw/Cairo.hs @@ -181,10 +181,9 @@ drawSegments dctx surf = do #endif (lend, as, bx) <- foldM (drawSegment dctx surf dw) (0, [], []) llyts let [rw, cw] = map sWidth [rlyts, clyts] - rstart = max lend (dw - rw - 1) + rstart = max lend (dw - rw) cstart = max lend ((dw - cw) / 2.0) - cmax = rstart - 1 - (_, as', bx') <- foldM (drawSegment dctx surf cmax) (cstart, as, bx) clyts + (_, as', bx') <- foldM (drawSegment dctx surf rstart) (cstart, as, bx) clyts (_, 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