From f8363e1485f854aa5e8a5687cb503d336b4c4618 Mon Sep 17 00:00:00 2001 From: jao Date: Sat, 10 Dec 2022 18:51:16 +0000 Subject: alignment: avoid overlapping of left and right segments Might help with #655 --- src/Xmobar/Draw/Cairo.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Xmobar/Draw/Cairo.hs b/src/Xmobar/Draw/Cairo.hs index dfcfd14..417a4ea 100644 --- a/src/Xmobar/Draw/Cairo.hs +++ b/src/Xmobar/Draw/Cairo.hs @@ -181,7 +181,7 @@ drawSegments dctx surf = do #endif (lend, as, bx) <- foldM (drawSegment dctx surf dw) (0, [], []) llyts let [rw, cw] = map sWidth [rlyts, clyts] - rstart = dw - rw - 1 + rstart = max (lend + 1) (dw - rw - 1) cstart = max (lend + 1) ((dw - cw) / 2.0) cmax = rstart - 1 (_, as', bx') <- foldM (drawSegment dctx surf cmax) (cstart, as, bx) clyts -- cgit v1.2.3