summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/Draw
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-12-10 19:02:40 +0000
committerjao <jao@gnu.org>2022-12-10 19:02:40 +0000
commit3f7a00defc69f9739c21390f6ba05990ff936b2b (patch)
treedb4bcce189426b89d4563649c58d17673a5b2e4c /src/Xmobar/Draw
parent09d966a58975e8322054c66941e776e5fcfa5e13 (diff)
downloadxmobar-3f7a00defc69f9739c21390f6ba05990ff936b2b.tar.gz
xmobar-3f7a00defc69f9739c21390f6ba05990ff936b2b.tar.bz2
off by ones
Diffstat (limited to 'src/Xmobar/Draw')
-rw-r--r--src/Xmobar/Draw/Cairo.hs5
1 files changed, 2 insertions, 3 deletions
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)