summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dw/textblock.cc10
-rw-r--r--dw/tools.cc2
2 files changed, 9 insertions, 3 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc
index 9a606675..b02173bd 100644
--- a/dw/textblock.cc
+++ b/dw/textblock.cc
@@ -2276,9 +2276,15 @@ bool Textblock::calcSizeOfWidgetInFlow (int wordIndex, Widget *widget,
int xRel = boxOffsetX () + leftInnerPadding
+ (lines->size () == 0 ? line1OffsetEff : 0);
int lastMargin, yLine = yOffsetOfLineToBeCreated (&lastMargin);
- int yRel = yLine - lastMargin
- + max (lastMargin, widget->getStyle()->margin.top);
+ int yRel = yLine - min (lastMargin, widget->getStyle()->margin.top);
+ DBG_OBJ_MSGF ("resize", 1,
+ "xRel = %d + %d + (%d == 0 ? %d : 0) = %d, "
+ "yRel = %d - min (%d, %d) = %d",
+ boxOffsetX (), leftInnerPadding , lines->size (),
+ line1OffsetEff, xRel, yLine, lastMargin,
+ widget->getStyle()->margin.top, yRel);
+
core::SizeParams childParams;
DBG_OBJ_ASSOC_CHILD (&childParams);
diff --git a/dw/tools.cc b/dw/tools.cc
index df52ae1d..a2d05367 100644
--- a/dw/tools.cc
+++ b/dw/tools.cc
@@ -37,7 +37,7 @@ void SizeParams::cleanup ()
void SizeParams::fill (int numPos, Widget **references, int *x, int *y)
{
- DBG_OBJ_ENTER0 ("resize", 0, "fill");
+ DBG_OBJ_ENTER ("resize", 0, "fill", "%d, ...", numPos);
cleanup ();