diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2016-06-04 19:33:26 -0400 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2016-06-04 19:33:26 -0400 |
commit | bff442ac673109f2ea5c0c3fcdbd66f30dfe5eb8 (patch) | |
tree | 4ea1c452c99350d1a8a783920edf9a2c7e077826 | |
parent | 306c457518884e82a2e8365555db183ec7da820d (diff) |
imported patch renames
-rw-r--r-- | dw/oofawarewidget.cc | 4 | ||||
-rw-r--r-- | dw/oofawarewidget.hh | 2 | ||||
-rw-r--r-- | dw/ooffloatsmgr.cc | 22 | ||||
-rw-r--r-- | dw/textblock.cc | 4 | ||||
-rw-r--r-- | dw/textblock.hh | 2 | ||||
-rw-r--r-- | dw/textblock_linebreaking.cc | 2 |
6 files changed, 24 insertions, 12 deletions
diff --git a/dw/oofawarewidget.cc b/dw/oofawarewidget.cc index 025111ae..8f704f40 100644 --- a/dw/oofawarewidget.cc +++ b/dw/oofawarewidget.cc @@ -573,9 +573,9 @@ void OOFAwareWidget::oofSizeChanged (bool extremesChanged) DBG_OBJ_LEAVE (); } -int OOFAwareWidget::getGeneratorX (int oofmIndex) +int OOFAwareWidget::getC0RelX (int oofmIndex) { - notImplemented ("OOFAwareWidget::getGeneratorX"); + notImplemented ("OOFAwareWidget::getC0RelX"); return 0; } diff --git a/dw/oofawarewidget.hh b/dw/oofawarewidget.hh index e49cce14..d72b894a 100644 --- a/dw/oofawarewidget.hh +++ b/dw/oofawarewidget.hh @@ -276,7 +276,7 @@ public: * Return position relative to container, not regarding * margin/border/padding, Called by OOFFloatsMgr to position floats. */ - virtual int getGeneratorX (int oofmIndex); + virtual int getC0RelX (int oofmIndex); /** * Return position relative to container, not regarding diff --git a/dw/ooffloatsmgr.cc b/dw/ooffloatsmgr.cc index 84b2f6ff..38a1bb4b 100644 --- a/dw/ooffloatsmgr.cc +++ b/dw/ooffloatsmgr.cc @@ -20,6 +20,7 @@ #include "ooffloatsmgr.hh" #include "oofawarewidget.hh" #include "../lout/debug.hh" +#include "../lout/msg.h" #include <limits.h> @@ -433,12 +434,13 @@ int OOFFloatsMgr::calcFloatX (Float *vloat) OOFAwareWidget *generator = vloat->generator; ensureFloatSize (vloat); + MSG("calcFloatX: "); switch (vloat->getWidget()->getStyle()->vloat) { case FLOAT_LEFT: // Left floats are always aligned on the left side of the generator // (content, not allocation) ... - x = generator->getGeneratorX (oofmIndex) + x = generator->getC0RelX (oofmIndex) + generator->getStyle()->boxOffsetX(); // ... but when the float exceeds the line break width of the container, @@ -475,11 +477,21 @@ int OOFFloatsMgr::calcFloatX (Float *vloat) effGeneratorWidth = min (vloat->generator->getGeneratorWidth (0, 0) + vloat->size.width, vloat->generator->getMaxGeneratorWidth ()); + MSG("UsesMaxGenW=%d gen->MaxGenW()=%d genW00=%d effGenW=%d ", + vloat->generator->usesMaxGeneratorWidth(), + vloat->generator->getMaxGeneratorWidth (), + vloat->generator->getGeneratorWidth (0, 0), + effGeneratorWidth); - x = max (generator->getGeneratorX (oofmIndex) + effGeneratorWidth + x = max (generator->getC0RelX (oofmIndex) + effGeneratorWidth - vloat->size.width - generator->getStyle()->boxRestWidth(), // Do not exceed container allocation: 0); + + MSG("vloatW=%d gen->getC0RelX()=%d g->boxRestWidth()=%d x=%d", + vloat->size.width, + generator->getC0RelX (oofmIndex), + generator->getStyle()->boxRestWidth(), x); break; default: @@ -487,8 +499,8 @@ int OOFFloatsMgr::calcFloatX (Float *vloat) x = 0; break; } - DBG_OBJ_LEAVE_VAL ("%d", x); + MSG("\n"); return x; } @@ -1106,7 +1118,7 @@ int OOFFloatsMgr::getBorder (Side side, int y, int h, OOFAwareWidget *lastGB, int d; switch (side) { case LEFT: - d = vloat->generator->getGeneratorX (oofmIndex) + d = vloat->generator->getC0RelX (oofmIndex) + vloat->generator->getStyle()->boxOffsetX (); break; @@ -1116,7 +1128,7 @@ int OOFFloatsMgr::getBorder (Side side, int y, int h, OOFAwareWidget *lastGB, // left border, see above). We have to calculate the difference // between the maximal widths. d = container->getMaxGeneratorWidth () - - (vloat->generator->getGeneratorX (oofmIndex) + - (vloat->generator->getC0RelX (oofmIndex) + vloat->generator->getMaxGeneratorWidth ()) + vloat->generator->getStyle()->boxRestWidth (); break; diff --git a/dw/textblock.cc b/dw/textblock.cc index 4fe19fdd..b70376a6 100644 --- a/dw/textblock.cc +++ b/dw/textblock.cc @@ -3067,9 +3067,9 @@ void Textblock::oofSizeChanged (bool extremesChanged) DBG_OBJ_LEAVE (); } -int Textblock::getGeneratorX (int oofmIndex) +int Textblock::getC0RelX (int oofmIndex) { - DBG_OBJ_ENTER ("resize", 0, "Textblock::getGeneratorX", "%d", oofmIndex); + DBG_OBJ_ENTER ("resize", 0, "Textblock::getC0RelX", "%d", oofmIndex); int x, xRef; if (findSizeRequestReference (oofmIndex, &xRef, NULL)) diff --git a/dw/textblock.hh b/dw/textblock.hh index fd92b636..98a0f9bb 100644 --- a/dw/textblock.hh +++ b/dw/textblock.hh @@ -902,7 +902,7 @@ public: void widgetRefSizeChanged (int externalIndex); void clearPositionChanged (); void oofSizeChanged (bool extremesChanged); - int getGeneratorX (int oofmIndex); + int getC0RelX (int oofmIndex); int getGeneratorY (int oofmIndex); int getGeneratorWidth (int callerX, int callerWidth); int getMaxGeneratorWidth (); diff --git a/dw/textblock_linebreaking.cc b/dw/textblock_linebreaking.cc index fddfb44f..5e921961 100644 --- a/dw/textblock_linebreaking.cc +++ b/dw/textblock_linebreaking.cc @@ -2120,7 +2120,7 @@ void Textblock::calcBorders (int lastOofRef, int height) newLineLeftBorder = max (newLineLeftBorder, oofm->getLeftBorder (y, height, this, effOofRef) - - getGeneratorX (i)); + - getC0RelX (i)); newLineLeftFloatHeight = max (newLineLeftFloatHeight, oofm->getLeftFloatHeight (y, height, this, effOofRef)); |