diff options
author | jao <jao@gnu.org> | 2022-09-30 06:50:53 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-09-30 06:50:53 +0100 |
commit | ef380c045957413948d390c152f6401869526285 (patch) | |
tree | 178db978e94bba8f67d68e63b90e286dedbc2074 /src/Xmobar/Draw/Boxes.hs | |
parent | e9a86329d40f82f7710ac5be294e908d221e00bc (diff) | |
download | xmobar-ef380c045957413948d390c152f6401869526285.tar.gz xmobar-ef380c045957413948d390c152f6401869526285.tar.bz2 |
Run.Parsers -> Config.Template
Diffstat (limited to 'src/Xmobar/Draw/Boxes.hs')
-rw-r--r-- | src/Xmobar/Draw/Boxes.hs | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/Xmobar/Draw/Boxes.hs b/src/Xmobar/Draw/Boxes.hs index 1358805..692e232 100644 --- a/src/Xmobar/Draw/Boxes.hs +++ b/src/Xmobar/Draw/Boxes.hs @@ -16,7 +16,6 @@ module Xmobar.Draw.Boxes (Line, boxLines, BoxRect, borderRect) where import qualified Xmobar.Config.Types as T -import qualified Xmobar.Run.Parsers as P type Line = (Double, Double, Double, Double) type BoxRect = (Double, Double, Double, Double) @@ -25,19 +24,19 @@ type BoxRect = (Double, Double, Double, Double) -- The Box is to be positioned between x0 and x1, with height ht, and drawn -- with line width lw. The returned lists are coordinates of the beginning -- and end of each line. -boxLines :: P.Box -> Double -> Double -> Double -> [Line] -boxLines (P.Box bd offset lw _ margins) ht x0 x1 = +boxLines :: T.Box -> Double -> Double -> Double -> [Line] +boxLines (T.Box bd offset lw _ margins) ht x0 x1 = case bd of - P.BBTop -> [rtop] - P.BBBottom -> [rbot] - P.BBVBoth -> [rtop, rbot] - P.BBLeft -> [rleft] - P.BBRight -> [rright] - P.BBHBoth -> [rleft, rright] - P.BBFull -> [rtop, rbot, rleft, rright] + T.BBTop -> [rtop] + T.BBBottom -> [rbot] + T.BBVBoth -> [rtop, rbot] + T.BBLeft -> [rleft] + T.BBRight -> [rright] + T.BBHBoth -> [rleft, rright] + T.BBFull -> [rtop, rbot, rleft, rright] where - (P.BoxMargins top right bot left) = margins - (P.BoxOffset align m) = offset + (T.BoxMargins top right bot left) = margins + (T.BoxOffset align m) = offset ma = fromIntegral m (p0, p1) = case align of T.L -> (0, -ma) |