hledger/hledger-ui/Hledger/UI/Theme.hs
Simon Michael 49e1840a0f ui: rewrite the ui using brick
hledger-ui (formerly hledger-vty) is now built on brick, a new
declarative UI layer built on vty. This brings much new power, and
should make the UI much easier to grow and maintain.

At this point, functionality and performance are similar to the old
version. There's no journal entries screen, but entering the postings
screen jumps to the latest posting, and layout is better (multiple
commodities are rendered on one line).

Requires unreleased brick from github (HEAD or some branch) for now.
2015-08-24 16:24:11 -07:00

35 lines
1.2 KiB
Haskell

----------------------------------------------------------------------
-- Theme
-- the all-important theming engine!
-- theme = Restrained
-- -- theme = Colorful
-- -- theme = Blood
-- data UITheme = Restrained | Colorful | Blood
-- (defaultattr,
-- currentlineattr,
-- statusattr
-- ) = case theme of
-- Restrained -> (defAttr
-- ,defAttr `withStyle` bold
-- ,defAttr `withStyle` reverseVideo
-- )
-- Colorful -> (defAttr `withStyle` reverseVideo
-- ,defAttr `withForeColor` white `withBackColor` red
-- ,defAttr `withForeColor` black `withBackColor` green
-- )
-- Blood -> (defAttr `withStyle` reverseVideo
-- ,defAttr `withForeColor` white `withBackColor` red
-- ,defAttr `withStyle` reverseVideo
-- )
-- -- halfbrightattr = defAttr `withStyle` dim
-- -- reverseattr = defAttr `withStyle` reverseVideo
-- -- redattr = defAttr `withForeColor` red
-- -- greenattr = defAttr `withForeColor` green
-- -- reverseredattr = defAttr `withStyle` reverseVideo `withForeColor` red
-- -- reversegreenattr= defAttr `withStyle` reverseVideo `withForeColor` green