summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2015-03-11 18:15:53 +0100
committerjao <jao@gnu.org>2015-03-11 18:15:53 +0100
commit208ecb56790ee6cd372cf340c0b22d7b5fe1d2ad (patch)
treea76e35d1b35d096c7624d4d5566b994b73a5f9b9 /src
parent2351c7f70c746ce35e13671201e809686e33fdc4 (diff)
downloadxmobar-208ecb56790ee6cd372cf340c0b22d7b5fe1d2ad.tar.gz
xmobar-208ecb56790ee6cd372cf340c0b22d7b5fe1d2ad.tar.bz2
Fix for default icon vertical alignment (#216)
Diffstat (limited to 'src')
-rw-r--r--src/Xmobar.hs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Xmobar.hs b/src/Xmobar.hs
index 36f6cbb..1963ba2 100644
--- a/src/Xmobar.hs
+++ b/src/Xmobar.hs
@@ -202,7 +202,7 @@ eventLoop tv xc@(XConf d r w fs is cfg) as signal = do
eventLoop tv xc as signal
reposWindow rcfg = do
- r' <- repositionWin d w (fs!!0) rcfg
+ r' <- repositionWin d w (head fs) rcfg
eventLoop tv (XConf d r' w fs is rcfg) as signal
updateConfigPosition ocfg =
@@ -325,11 +325,9 @@ verticalOffset ht (Text t) fontst conf
let bwidth = borderOffset (border conf) (borderWidth conf)
verticalMargin = fi ht - fi (as + ds) - 2 * fi (abs bwidth)
return $ fi ht - fi ds - (verticalMargin `div` 2) + bwidth + 1
-verticalOffset _ (Icon _) _ conf
+verticalOffset ht (Icon _) _ conf
| iconOffset conf > -1 = return $ fi (iconOffset conf)
- | otherwise = do
- let bwidth = borderOffset (border conf) (borderWidth conf)
- return $ bwidth + 1
+ | otherwise = return $ fi (ht `div` 2)
-- | An easy way to print the stuff we need to print
printStrings :: Drawable -> GC -> [XFont] -> Position