summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/Draw
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-12-10 18:51:16 +0000
committerjao <jao@gnu.org>2022-12-10 18:51:16 +0000
commitf8363e1485f854aa5e8a5687cb503d336b4c4618 (patch)
tree1fdbd5c4bdc5b6decf801e5afe00b1a5386a6fce /src/Xmobar/Draw
parentc7d9fd8fe08f6474253733fd537a1b07251f3633 (diff)
downloadxmobar-f8363e1485f854aa5e8a5687cb503d336b4c4618.tar.gz
xmobar-f8363e1485f854aa5e8a5687cb503d336b4c4618.tar.bz2
alignment: avoid overlapping of left and right segments
Might help with #655
Diffstat (limited to 'src/Xmobar/Draw')
-rw-r--r--src/Xmobar/Draw/Cairo.hs2
1 files changed, 1 insertions, 1 deletions
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