@@ -359,7 +359,7 @@ void Textblock::sizeRequestImpl (core::Requisition *requisition, int numPos,
359359 // margin of the first line box:
360360 requisition->ascent = calcVerticalBorder (getStyle ()->padding .top ,
361361 getStyle ()->borderWidth .top ,
362- getStyle ()->margin . top
362+ getStyle ()->marginTop ()
363363 + extraSpace.top ,
364364 firstLine->borderAscent ,
365365 firstLine->marginAscent );
@@ -373,7 +373,7 @@ void Textblock::sizeRequestImpl (core::Requisition *requisition, int numPos,
373373 // for this case is not necessary.)
374374 calcVerticalBorder (getStyle ()->padding .bottom ,
375375 getStyle ()->borderWidth .bottom ,
376- getStyle ()->margin . bottom + extraSpace.bottom ,
376+ getStyle ()->marginBottom () + extraSpace.bottom ,
377377 lastLine->borderDescent , lastLine->marginDescent );
378378 } else {
379379 requisition->width = leftInnerPadding + boxDiffWidth ();
@@ -777,12 +777,12 @@ int Textblock::getAvailWidthOfChild (Widget *child, bool forceValue)
777777 /* Clamp to min-width and max-width if given, taking into
778778 * account leftInnerPadding. */
779779 int maxWidth = child->calcWidth (child->getStyle ()->maxWidth ,
780- -1 , this , -1 , false );
780+ -1 , this , -1 , false ). total ;
781781 if (maxWidth != -1 && width > maxWidth - leftInnerPadding)
782782 width = maxWidth - leftInnerPadding;
783783
784784 int minWidth = child->calcWidth (child->getStyle ()->minWidth ,
785- -1 , this , -1 , false );
785+ -1 , this , -1 , false ). total ;
786786 if (minWidth != -1 && width < minWidth - leftInnerPadding)
787787 width = minWidth - leftInnerPadding;
788788 }
@@ -1583,7 +1583,7 @@ int Textblock::findLineIndexWhenNotAllocated (int y)
15831583 return
15841584 findLineIndex (y, calcVerticalBorder (getStyle ()->padding .top ,
15851585 getStyle ()->borderWidth .top ,
1586- getStyle ()->margin . top
1586+ getStyle ()->marginTop ()
15871587 + extraSpace.top ,
15881588 lines->getRef (0 )->borderAscent ,
15891589 lines->getRef (0 )->marginAscent ));
@@ -2337,14 +2337,14 @@ bool Textblock::calcSizeOfWidgetInFlow (int wordIndex, Widget *widget,
23372337 int rightBorder = boxRestWidth ();
23382338
23392339 int lastMargin, yLine = yOffsetOfLineToBeCreated (&lastMargin);
2340- int yRel = yLine - min (lastMargin, widget->getStyle ()->margin . top );
2340+ int yRel = yLine - min (lastMargin, widget->getStyle ()->marginTop () );
23412341
23422342 DBG_OBJ_MSGF (" resize" , 1 ,
23432343 " leftBorder = %d + %d + (%d == 0 ? %d : 0) = %d, "
23442344 " rightBorder = %d, yRel = %d - min (%d, %d) = %d" ,
23452345 boxOffsetX (), leftInnerPadding , lines->size (),
23462346 line1OffsetEff, leftBorder, rightBorder, yLine, lastMargin,
2347- widget->getStyle ()->margin . top , yRel);
2347+ widget->getStyle ()->marginTop () , yRel);
23482348
23492349 core::SizeParams childParams;
23502350 DBG_OBJ_ASSOC_CHILD (&childParams);
@@ -3328,14 +3328,14 @@ int Textblock::yOffsetOfLineToBeCreated (int *lastMargin)
33283328 if (lines->size () == 0 ) {
33293329 result = calcVerticalBorder (getStyle ()->padding .top ,
33303330 getStyle ()->borderWidth .top + extraSpace.top ,
3331- getStyle ()->margin . top , 0 , 0 );
3331+ getStyle ()->marginTop () , 0 , 0 );
33323332 if (lastMargin)
3333- *lastMargin = getStyle ()->margin . top ;
3333+ *lastMargin = getStyle ()->marginTop () ;
33343334 } else {
33353335 Line *firstLine = lines->getRef (0 ), *lastLine = lines->getLastRef ();
33363336 result = calcVerticalBorder (getStyle ()->padding .top ,
33373337 getStyle ()->borderWidth .top ,
3338- getStyle ()->margin . top + extraSpace.top ,
3338+ getStyle ()->marginTop () + extraSpace.top ,
33393339 firstLine->borderAscent ,
33403340 firstLine->marginAscent )
33413341 - firstLine->borderAscent + lastLine->top + lastLine->totalHeight (0 );
@@ -3365,7 +3365,7 @@ int Textblock::yOffsetOfLineCreated (Line *line)
33653365 Line *firstLine = lines->getRef (0 );
33663366 result = calcVerticalBorder (getStyle ()->padding .top ,
33673367 getStyle ()->borderWidth .top ,
3368- getStyle ()->margin . top + extraSpace.top ,
3368+ getStyle ()->marginTop () + extraSpace.top ,
33693369 firstLine->borderAscent ,
33703370 firstLine->marginAscent )
33713371 - firstLine->borderAscent + line->top ;
0 commit comments