ui: reg: increase post-date and inter-amt space

This commit is contained in:
Simon Michael 2015-08-24 15:02:13 -07:00
parent efb3a154da
commit b6e98499ef

View File

@ -107,17 +107,18 @@ drawRegisterScreen2 AppState{aopts=_opts, aScreen=RegisterScreen2{rs2State=l}} =
-- they need, while reserving a minimum of space for other -- they need, while reserving a minimum of space for other
-- columns and whitespace. If they don't get all they need, -- columns and whitespace. If they don't get all they need,
-- allocate it to them proportionally to their maximum widths. -- allocate it to them proportionally to their maximum widths.
maxamtswidth = max 0 (totalwidth - 21) whitespacewidth = 23
changewidth' = maximum' $ map (length . fourth5) displayitems maxamtswidth = max 0 (totalwidth - whitespacewidth)
balwidth' = maximum' $ map (length . fifth5) displayitems maxchangewidthseen = maximum' $ map (length . fourth5) displayitems
changewidthproportion = fromIntegral (changewidth' + balwidth') / fromIntegral changewidth' maxbalwidthseen = maximum' $ map (length . fifth5) displayitems
changewidthproportion = fromIntegral (maxchangewidthseen + maxbalwidthseen) / fromIntegral maxchangewidthseen
maxchangewidth = round $ fromIntegral maxamtswidth / changewidthproportion maxchangewidth = round $ fromIntegral maxamtswidth / changewidthproportion
maxbalwidth = maxamtswidth - maxchangewidth maxbalwidth = maxamtswidth - maxchangewidth
changewidth = min maxchangewidth changewidth' changewidth = min maxchangewidth maxchangewidthseen
balwidth = min maxbalwidth balwidth' balwidth = min maxbalwidth maxbalwidthseen
-- assign the remaining space to the description and accounts columns -- assign the remaining space to the description and accounts columns
maxdescacctswidth = totalwidth - 17 - changewidth - balwidth maxdescacctswidth = totalwidth - (whitespacewidth - 4) - changewidth - balwidth
-- allocating proportionally. -- allocating proportionally.
-- descwidth' = maximum' $ map (length . second5) displayitems -- descwidth' = maximum' $ map (length . second5) displayitems
-- acctswidth' = maximum' $ map (length . third5) displayitems -- acctswidth' = maximum' $ map (length . third5) displayitems