diff options
author | Sebastian Geerken <devnull@localhost> | 2014-10-03 13:51:25 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-10-03 13:51:25 +0200 |
commit | 8fd2ae404f3f0af087217ba79ff9a35955fb026f (patch) | |
tree | bc42c1fbbb2224a52846d62111e5924ec788d0fc /dw/table.cc | |
parent | 59b3ae08f3fcd91c0792e2ea840d0072f1d73416 (diff) | |
parent | 5f1cf298395601f67afc9aff78e547d915663daf (diff) |
Merge with main repo. (But something is not working yet.)
Diffstat (limited to 'dw/table.cc')
-rw-r--r-- | dw/table.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/dw/table.cc b/dw/table.cc index 4259111a..ce45b7ad 100644 --- a/dw/table.cc +++ b/dw/table.cc @@ -753,12 +753,16 @@ void Table::forceCalcCellSizes (bool calcHeights) getExtremes (&extremes); int availWidth = getAvailWidth (true); - int totalWidth = availWidth - - ((numCols + 1) * getStyle()->hBorderSpacing + boxDiffWidth ()); - + // When adjust_table_min_width is set, use the minimal (intrinsic) + // width for correction. + int corrWidth = + Table::getAdjustTableMinWidth () ? extremes.minWidthIntrinsic : 0; + int totalWidth = misc::max (availWidth, corrWidth) + - ((numCols + 1) * getStyle()->hBorderSpacing + boxDiffWidth ()); + DBG_OBJ_MSGF ("resize", 1, - "totalWidth = %d - ((%d - 1) * %d + %d) = <b>%d</b>", - availWidth, numCols, getStyle()->hBorderSpacing, + "totalWidth = max (%d, %d) - ((%d - 1) * %d + %d) = <b>%d</b>", + availWidth, corrWidth, numCols, getStyle()->hBorderSpacing, boxDiffWidth (), totalWidth); colWidths->setSize (numCols, 0); |