--
-- | And turn on the colours
--
initcolours :: UIStyle -> IO ()
initcolours sty = do
    let ls  = [helpscreen sty, warnings sty, window sty, 
               selected sty, titlebar sty, progress sty,
               blockcursor sty, cursors sty, combined sty ]
        (Style fg bg) = progress sty    -- bonus style

    pairs <- initUiColors (ls ++ [Style bg bg, Style fg fg])
    writeIORef pairMap pairs
    -- set the background
    uiAttr (window sty) >>= \(_,p) -> Curses.bkgrndSet nullA p

------------------------------------------------------------------------
--
-- | Set up the ui attributes, given a ui style record
--
-- Returns an association list of pairs for foreground and bg colors,
-- associated with the terminal color pair that has been defined for
-- those colors.
--
initcolours :: UIStyle -> IO ()
initcolours sty = do
    let ls  = [helpscreen sty, warnings sty, window sty, 
               selected sty, titlebar sty, progress sty,
               blockcursor sty, cursors sty, combined sty ]
        (Style fg bg) = progress sty    -- bonus style

    pairs <- initUiColors (ls ++ [Style bg bg, Style fg fg])
    writeIORef pairMap pairs
    -- set the background
    uiAttr (window sty) >>= \(_,p) -> Curses.bkgrndSet nullA p

------------------------------------------------------------------------
--
-- | Set up the ui attributes, given a ui style record
--
-- Returns an association list of pairs for foreground and bg colors,
-- associated with the terminal color pair that has been defined for
-- those colors.
--
initcolours sty = do
    let ls  = [helpscreen sty, warnings sty, window sty, 
               selected sty, titlebar sty, progress sty,
               blockcursor sty, cursors sty, combined sty ]
        (Style fg bg) = progress sty    -- bonus style

    pairs <- initUiColors (ls ++ [Style bg bg, Style fg fg])
    writeIORef pairMap pairs
    -- set the background
    uiAttr (window sty) >>= \(_,p) -> Curses.bkgrndSet nullA p

------------------------------------------------------------------------
--
-- | Set up the ui attributes, given a ui style record
--
-- Returns an association list of pairs for foreground and bg colors,
-- associated with the terminal color pair that has been defined for
-- those colors.
--