From 8ea89a00a951b303f8b661c3b22a666c6887cfcb Mon Sep 17 00:00:00 2001 From: Tomas Janousek Date: Sun, 15 Nov 2020 16:12:13 +0000 Subject: Fix vertical centering of additional fonts The readme says additional fonts are centered vertically if a corresponding offset isn't specified in `textOffsets`, but this didn't happen as we used the first font's metrics for centering of all fonts instead. Fixes: a2365debfaba ("New configuration parameter `textOffsets` (fixes #311)") --- src/Xmobar/X11/Draw.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Xmobar/X11/Draw.hs b/src/Xmobar/X11/Draw.hs index 5805b5a..1ded312 100644 --- a/src/Xmobar/X11/Draw.hs +++ b/src/Xmobar/X11/Draw.hs @@ -149,7 +149,7 @@ printStrings dr gc fontlist voffs offs a boxes sl@((s,c,i,l):xs) = do (fc,bc) = case break (==',') (tColorsString c) of (f,',':b) -> (f, b ) (f, _) -> (f, bgColor conf) - valign <- verticalOffset ht s (NE.head fontlist) (voffs !! i) conf + valign <- verticalOffset ht s fontst (voffs !! i) conf let (ht',ay) = case (tBgTopOffset c, tBgBottomOffset c) of (-1,_) -> (0, -1) (_,-1) -> (0, -1) -- cgit v1.2.3