Slightly improve column layouting (overflow) behaviour
parent
fb2483242a
commit
c6eb7a71b8
|
@ -1307,8 +1307,11 @@ layoutBriDocM = \case
|
||||||
-- in each column. but in that line, in the last column, we will be
|
-- in each column. but in that line, in the last column, we will be
|
||||||
-- forced to occupy the full vertical space, not reduced by any factor.
|
-- forced to occupy the full vertical space, not reduced by any factor.
|
||||||
let fixedPosXs = if maxX>colMax
|
let fixedPosXs = if maxX>colMax
|
||||||
then let factor :: Float = fromIntegral (colMax - curX)
|
then let
|
||||||
|
factor :: Float =
|
||||||
|
max 1.0 ( fromIntegral (10 + colMax - curX) -- TODO: remove arbitrary 10..
|
||||||
/ fromIntegral (maxX - curX)
|
/ fromIntegral (maxX - curX)
|
||||||
|
)
|
||||||
offsets = (subtract curX) <$> posXs
|
offsets = (subtract curX) <$> posXs
|
||||||
fixed = offsets <&> fromIntegral .> (*factor) .> truncate
|
fixed = offsets <&> fromIntegral .> (*factor) .> truncate
|
||||||
in fixed <&> (+curX)
|
in fixed <&> (+curX)
|
||||||
|
|
Loading…
Reference in New Issue