diff options
author | jao <jao@gnu.org> | 2022-09-13 05:44:29 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-09-13 05:44:29 +0100 |
commit | 2e9a7612751000bd57b81100c99ff0ba06cafa38 (patch) | |
tree | 6df18a36c60a86e48261b7ca4e61c3bfaef6023b /src/Xmobar/X11/XlibDraw.hs | |
parent | 0c13ab7001fea76c8ef06b681b8463471399754b (diff) | |
download | xmobar-2e9a7612751000bd57b81100c99ff0ba06cafa38.tar.gz xmobar-2e9a7612751000bd57b81100c99ff0ba06cafa38.tar.bz2 |
'Core' fonts not used anymore (utf8 is always required)
Diffstat (limited to 'src/Xmobar/X11/XlibDraw.hs')
-rw-r--r-- | src/Xmobar/X11/XlibDraw.hs | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/src/Xmobar/X11/XlibDraw.hs b/src/Xmobar/X11/XlibDraw.hs index 9a005e8..d1432f8 100644 --- a/src/Xmobar/X11/XlibDraw.hs +++ b/src/Xmobar/X11/XlibDraw.hs @@ -81,31 +81,17 @@ verticalOffset ht (Icon _) _ _ conf | otherwise = return $ fi (ht `div` 2) - 1 verticalOffset _ (Hspace _) _ voffs _ = return $ fi voffs -printString :: Display - -> Drawable - -> XFont - -> GC - -> String - -> String - -> Position - -> Position - -> Position - -> Position - -> String - -> Int +printString :: Display -> Drawable -> XFont -> GC + -> String -> String + -> Position -> Position -> Position -> Position + -> String -> Int -> IO () -printString d p (Core fs) gc fc bc x y _ _ s a = do - setFont d gc $ fontFromFontStruct fs - withColors d [fc, bc] $ \[fc', bc'] -> do - setForeground d gc fc' - when (a == 255) (setBackground d gc bc') - drawImageString d p gc x y s -printString d p (Utf8 fs) gc fc bc x y _ _ s a = - withColors d [fc, bc] $ \[fc', bc'] -> do - setForeground d gc fc' - when (a == 255) (setBackground d gc bc') - liftIO $ wcDrawImageString d p fs gc x y s +printString d p fs gc fc bc x y _ _ s a = + withColors d [fc, bc] $ \[fc', bc'] -> do + setForeground d gc fc' + when (a == 255) (setBackground d gc bc') + liftIO $ wcDrawImageString d p fs gc x y s -- | An easy way to print the stuff we need to print printStrings :: Drawable |