summaryrefslogtreecommitdiff
path: root/dw/textblock.cc
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2015-12-28 14:35:37 +0100
committerSebastian Geerken <devnull@localhost>2015-12-28 14:35:37 +0100
commitc989be311298e3b120cce43f3483c7c583d4d56c (patch)
treefd19c477cf528297c3594a9aedc6b88afcb43e08 /dw/textblock.cc
parent7d8e6758d2b4fe7f0240a6e9449d66b301a9008e (diff)
SRDOP: Correct y position passed by Textblock (plus RTFL messages).
Diffstat (limited to 'dw/textblock.cc')
-rw-r--r--dw/textblock.cc10
1 files changed, 8 insertions, 2 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);