summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/Draw/Cairo.hs
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-11-13 21:12:51 +0000
committerjao <jao@gnu.org>2022-11-13 21:12:51 +0000
commit26726e092beb0851743c3fb046e82ce323d818e6 (patch)
tree0c85a069c57c48bab108b05dcdeb5ad8bca45908 /src/Xmobar/Draw/Cairo.hs
parente98f9a76ec75c21e0f8abb3e0145cceb5141582f (diff)
downloadxmobar-26726e092beb0851743c3fb046e82ce323d818e6.tar.gz
xmobar-26726e092beb0851743c3fb046e82ce323d818e6.tar.bz2
similar take on centering the center
Diffstat (limited to 'src/Xmobar/Draw/Cairo.hs')
-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 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)