mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-20 10:47:29 +03:00
49e1840a0f
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.
35 lines
1.2 KiB
Haskell
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
|
|
|