diff options
author | Sebastian Geerken <devnull@localhost> | 2014-05-29 23:30:00 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-05-29 23:30:00 +0200 |
commit | f9ce17839903ef10002f19a0c758dfeb828ae11a (patch) | |
tree | fd233d84a28d7214418624c548ad76ec6af39944 /dw/table.cc | |
parent | e1b61ef1378520a68cb288b6b3c322f70f2a6a41 (diff) |
Removed size hints.
Diffstat (limited to 'dw/table.cc')
-rw-r--r-- | dw/table.cc | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/dw/table.cc b/dw/table.cc index d565fc2c..d15100b7 100644 --- a/dw/table.cc +++ b/dw/table.cc @@ -41,11 +41,6 @@ Table::Table(bool limitTextWidth) rowClosed = false; - // random values - availWidth = 100; - availAscent = 100; - availDescent = 0; - numRows = 0; numCols = 0; curRow = -1; @@ -201,32 +196,6 @@ void Table::resizeDrawImpl () redrawY = getHeight (); } -void Table::setWidth (int width) -{ - // If limitTextWidth is set, a queueResize may also be necessary. - if (availWidth != width || limitTextWidth) { - _MSG(" Table::setWidth %d\n", width); - availWidth = width; - queueResize (0, false); - } -} - -void Table::setAscent (int ascent) -{ - if (availAscent != ascent) { - availAscent = ascent; - queueResize (0, false); - } -} - -void Table::setDescent (int descent) -{ - if (availDescent != descent) { - availDescent = descent; - queueResize (0, false); - } -} - bool Table::isBlockLevel () { return true; @@ -508,12 +477,13 @@ void Table::forceCalcCellSizes () * rendering is implemented, to handle fixed positions etc., * as defined by CSS2.) */ + int availWidth = getAvailWidth (); totalWidth = misc::min (core::style::multiplyWithPerLength (availWidth, getStyle()->width), availWidth); } else if (getStyle()->width == core::style::LENGTH_AUTO) { - totalWidth = availWidth; + totalWidth = getAvailWidth (); forceTotalWidth = 0; } @@ -559,7 +529,7 @@ void Table::forceCalcCellSizes () width += colWidths->get (col + i); core::Requisition childRequisition; - children->get(n)->cell.widget->setWidth (width); + //children->get(n)->cell.widget->setWidth (width); children->get(n)->cell.widget->sizeRequest (&childRequisition); childHeight = childRequisition.ascent + childRequisition.descent; if (children->get(n)->cell.rowspan == 1) { |