mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-12-02 11:05:10 +03:00
Table: naming improvement
This commit is contained in:
parent
f91c56976d
commit
e84f140a82
@ -173,7 +173,7 @@ renderTable t =
|
|||||||
byColumn = transpose cellResults
|
byColumn = transpose cellResults
|
||||||
toW = Widget Fixed Fixed . return
|
toW = Widget Fixed Fixed . return
|
||||||
totalHeight = sum rowHeights
|
totalHeight = sum rowHeights
|
||||||
maybeAlign align width w =
|
applyColAlignment align width w =
|
||||||
Widget Fixed Fixed $ do
|
Widget Fixed Fixed $ do
|
||||||
result <- render w
|
result <- render w
|
||||||
case align of
|
case align of
|
||||||
@ -189,7 +189,7 @@ renderTable t =
|
|||||||
AlignBottom -> vLimit rHeight $ padTop Max $ toW result
|
AlignBottom -> vLimit rHeight $ padTop Max $ toW result
|
||||||
mkColumn (hAlign, width, colCells) = do
|
mkColumn (hAlign, width, colCells) = do
|
||||||
let paddedCells = flip map (zip3 allRowAligns rowHeights colCells) $ \(vAlign, rHeight, cell) ->
|
let paddedCells = flip map (zip3 allRowAligns rowHeights colCells) $ \(vAlign, rHeight, cell) ->
|
||||||
maybeAlign hAlign width $
|
applyColAlignment hAlign width $
|
||||||
applyRowAlignment rHeight vAlign cell
|
applyRowAlignment rHeight vAlign cell
|
||||||
maybeRowBorders = if drawRowBorders t
|
maybeRowBorders = if drawRowBorders t
|
||||||
then intersperse (hLimit width hBorder)
|
then intersperse (hLimit width hBorder)
|
||||||
|
Loading…
Reference in New Issue
Block a user