diff options
author | Tomas Janousek <tomi@nomi.cz> | 2020-11-15 16:12:13 +0000 |
---|---|---|
committer | Tomas Janousek <tomi@nomi.cz> | 2020-11-15 16:44:57 +0000 |
commit | 8ea89a00a951b303f8b661c3b22a666c6887cfcb (patch) | |
tree | 176c8a513f1cf81a771a82bf6b70170475cea224 /src | |
parent | ea1096f20031364b5cffb0eebd64a6dc1a6e4a6e (diff) | |
download | xmobar-8ea89a00a951b303f8b661c3b22a666c6887cfcb.tar.gz xmobar-8ea89a00a951b303f8b661c3b22a666c6887cfcb.tar.bz2 |
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)")
Diffstat (limited to 'src')
-rw-r--r-- | src/Xmobar/X11/Draw.hs | 2 |
1 files changed, 1 insertions, 1 deletions
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) |