diff options
author | Sebastian Geerken <devnull@localhost> | 2014-05-30 15:16:25 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-05-30 15:16:25 +0200 |
commit | c3c97fcf013045be850dde4ba9635ce97a0ab47e (patch) | |
tree | 4ac4cca2b79cc10c5763bccf1bff398d06eb9103 | |
parent | 1a3983870885abaf0cb73cc72e46a43f7f289a10 (diff) |
Grows cont (margin etc.)
-rw-r--r-- | dw/textblock.cc | 6 | ||||
-rw-r--r-- | dw/widget.cc | 1 |
2 files changed, 3 insertions, 4 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc index 7ef6ad27..7da706f7 100644 --- a/dw/textblock.cc +++ b/dw/textblock.cc @@ -778,8 +778,7 @@ bool Textblock::isBlockLevel () int Textblock::getAvailWidthOfChild (Widget *child) { - // TODO Border, padding etc. - // TODO Implement also for ListItem. + // TODO Implement also for ListItem (subtract space for bullet). // TODO Correct by extremes? DBG_OBJ_MSGF ("resize", 0, "<b>getAvailWidthOfChild</b> (%p)", child); @@ -788,9 +787,10 @@ int Textblock::getAvailWidthOfChild (Widget *child) int width; if (core::style::isAbsLength (child->getStyle()->width)) + // TODO What does "width" exactly stand for? (Content or all?) width = core::style::absLengthVal (child->getStyle()->width); else { - int containerWidth = getAvailWidth (); + int containerWidth = getAvailWidth () - boxDiffWidth (); if (core::style::isPerLength (child->getStyle()->width)) width = core::style::multiplyWithPerLength (containerWidth, child->getStyle()->width); diff --git a/dw/widget.cc b/dw/widget.cc index 0f656463..792647e9 100644 --- a/dw/widget.cc +++ b/dw/widget.cc @@ -343,7 +343,6 @@ void Widget::sizeRequest (Requisition *requisition) int Widget::getAvailWidth () { // TODO Correct by extremes? - // TODO Border, padding etc.? (Relevant here?) DBG_OBJ_MSG ("resize", 0, "<b>getAvailWidth</b> ()"); DBG_OBJ_MSG_START (); |