aboutsummaryrefslogtreecommitdiff
path: root/dw/textblock.hh
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2014-09-10 12:26:44 +0200
committerSebastian Geerken <devnull@localhost>2014-09-10 12:26:44 +0200
commit5b50f9e319263a730843be1aae5dfd7c549e1622 (patch)
treeec0ce2e00c11e7d6d95d187f5002219bb1b9296f /dw/textblock.hh
parent02a6942a42619ad31ae0ea0b2f8b4f6e17ae3272 (diff)
parentafe572a3dcac774dd90684f1328dd480bfe7db97 (diff)
Merge with main repo.
Diffstat (limited to 'dw/textblock.hh')
-rw-r--r--dw/textblock.hh18
1 files changed, 13 insertions, 5 deletions
diff --git a/dw/textblock.hh b/dw/textblock.hh
index a4b341ec..df2a8343 100644
--- a/dw/textblock.hh
+++ b/dw/textblock.hh
@@ -850,14 +850,22 @@ protected:
inline bool mustBeWidenedToAvailWidth () {
DBG_OBJ_ENTER0 ("resize", 0, "mustBeWidenedToAvailWidth");
- bool b = getStyle()->display == core::style::DISPLAY_BLOCK &&
+ bool toplevel = getParent () == NULL,
+ block = getStyle()->display == core::style::DISPLAY_BLOCK,
+ vloat = testWidgetFloat (this),
+ abspos = testWidgetAbsolutelyPositioned (this),
+ fixpos = testWidgetFixedlyPositioned (this),
// In detail, this depends on what the respective OOFM does
// with the child widget:
- !(testWidgetFloat (this) || testWidgetAbsolutelyPositioned (this) ||
- testWidgetFixedlyPositioned (this));
- DBG_OBJ_MSGF ("resize", 0, "=> %s", b ? "true" : "false");
+ result = toplevel || (block && !(vloat || abspos || fixpos));
+ DBG_OBJ_MSGF ("resize", 0,
+ "=> %s (toplevel: %s, block: %s, float: %s, abspos: %s, "
+ "fixpos: %s)",
+ result ? "true" : "false", toplevel ? "true" : "false",
+ block ? "true" : "false", vloat ? "true" : "false",
+ abspos ? "true" : "false", fixpos ? "true" : "false");
DBG_OBJ_LEAVE ();
- return b;
+ return result;
}
public: