diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2016-06-04 20:46:17 -0400 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2016-06-04 20:46:17 -0400 |
commit | 1db95177abded269fbc4071d59201b05423f04bf (patch) | |
tree | f7a8e967760dbd8d97068f133519836caf67e6bb /dw/ooffloatsmgr.cc | |
parent | 4096aafdb18a2a6f0fe5bb44d1c39b32f318f69c (diff) |
Revert an accidental commit of testing code (2 patches in the queue).
Diffstat (limited to 'dw/ooffloatsmgr.cc')
-rw-r--r-- | dw/ooffloatsmgr.cc | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/dw/ooffloatsmgr.cc b/dw/ooffloatsmgr.cc index cadf980e..84b2f6ff 100644 --- a/dw/ooffloatsmgr.cc +++ b/dw/ooffloatsmgr.cc @@ -20,7 +20,6 @@ #include "ooffloatsmgr.hh" #include "oofawarewidget.hh" #include "../lout/debug.hh" -#include "../lout/msg.h" #include <limits.h> @@ -434,13 +433,12 @@ 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->getC0RelX (oofmIndex) + x = generator->getGeneratorX (oofmIndex) + generator->getStyle()->boxOffsetX(); // ... but when the float exceeds the line break width of the container, @@ -475,27 +473,13 @@ int OOFFloatsMgr::calcFloatX (Float *vloat) // (ii) If there is more than one line, the line break will already be // exceeded, and so be smaller that GB width + float width. effGeneratorWidth = - //min (vloat->generator->getGeneratorWidth (0, 0), 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->getC0RelX (oofmIndex) + effGeneratorWidth + x = max (generator->getGeneratorX (oofmIndex) + effGeneratorWidth - vloat->size.width - generator->getStyle()->boxRestWidth(), - //- generator->getStyle()->boxRestWidth(), // Do not exceed container allocation: 0); - - //if (x == 356) x -= 34; - - MSG("vloatW=%d gen->getC0RelX()=%d g->boxRestWidth()=%d x=%d", - vloat->size.width, - generator->getC0RelX (oofmIndex), - generator->getStyle()->boxRestWidth(), x); break; default: @@ -503,8 +487,8 @@ int OOFFloatsMgr::calcFloatX (Float *vloat) x = 0; break; } + DBG_OBJ_LEAVE_VAL ("%d", x); - MSG("\n"); return x; } @@ -1122,7 +1106,7 @@ int OOFFloatsMgr::getBorder (Side side, int y, int h, OOFAwareWidget *lastGB, int d; switch (side) { case LEFT: - d = vloat->generator->getC0RelX (oofmIndex) + d = vloat->generator->getGeneratorX (oofmIndex) + vloat->generator->getStyle()->boxOffsetX (); break; @@ -1132,7 +1116,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->getC0RelX (oofmIndex) + - (vloat->generator->getGeneratorX (oofmIndex) + vloat->generator->getMaxGeneratorWidth ()) + vloat->generator->getStyle()->boxRestWidth (); break; |