diff options
author | corvid <corvid@lavabit.com> | 2010-11-19 16:09:49 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2010-11-19 16:09:49 +0000 |
commit | c5387459af97e2ba5007f20ffcbec0876a69e63f (patch) | |
tree | b404d26b9d1efee5e83b6bf7c4c9226308b5925e /dw/textblock.cc | |
parent | e41e07e71b157c2c1ff2b54743a6ff0fcc5a7745 (diff) |
don't use text-indent when nesting blocks
Diffstat (limited to 'dw/textblock.cc')
-rw-r--r-- | dw/textblock.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc index af3d1cb0..326c9dbc 100644 --- a/dw/textblock.cc +++ b/dw/textblock.cc @@ -35,6 +35,7 @@ int Textblock::CLASS_ID = -1; Textblock::Textblock (bool limitTextWidth) { registerName ("dw::Textblock", &CLASS_ID); + setFlags (BLOCK_LEVEL); setFlags (USES_HINTS); setButtonSensitive(true); @@ -892,11 +893,16 @@ void Textblock::wordWrap(int wordIndex) } else { int indent = 0; - if (core::style::isPerLength(getStyle()->textIndent)) { - indent = misc::roundInt(this->availWidth * - core::style::perLengthVal (getStyle()->textIndent)); + if (word->content.type == core::Content::WIDGET && + word->content.widget->blockLevel() == true) { + /* don't use text-indent when nesting blocks */ } else { - indent = core::style::absLengthVal (getStyle()->textIndent); + if (core::style::isPerLength(getStyle()->textIndent)) { + indent = misc::roundInt(this->availWidth * + core::style::perLengthVal (getStyle()->textIndent)); + } else { + indent = core::style::absLengthVal (getStyle()->textIndent); + } } line1OffsetEff = line1Offset + indent; } |