diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-03-23 12:07:37 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-03-23 12:07:37 +0100 |
commit | 9164300a781474a91ceef47ca2cf12653cf4a562 (patch) | |
tree | 9193413b048daacadf068dc4ed3c355b599b5384 /src | |
parent | 4140475302ea088e5ad74ebf24c98700cf13b0fa (diff) |
disable negative margins for now
dw::Textblock does not handle them properly yet.
Diffstat (limited to 'src')
-rw-r--r-- | src/styleengine.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/styleengine.cc b/src/styleengine.cc index 51e304e9..4c00f362 100644 --- a/src/styleengine.cc +++ b/src/styleengine.cc @@ -355,15 +355,23 @@ void StyleEngine::apply (StyleAttrs *attrs, CssPropertyList *props) { break; case CSS_PROPERTY_MARGIN_BOTTOM: computeValue (&attrs->margin.bottom, p->value.intVal, attrs->font); + if (attrs->margin.bottom < 0) // \todo fix negative margins in dw/* + attrs->margin.bottom = 0; break; case CSS_PROPERTY_MARGIN_LEFT: computeValue (&attrs->margin.left, p->value.intVal, attrs->font); + if (attrs->margin.left < 0) // \todo fix negative margins in dw/* + attrs->margin.left = 0; break; case CSS_PROPERTY_MARGIN_RIGHT: computeValue (&attrs->margin.right, p->value.intVal, attrs->font); + if (attrs->margin.right < 0) // \todo fix negative margins in dw/* + attrs->margin.right = 0; break; case CSS_PROPERTY_MARGIN_TOP: computeValue (&attrs->margin.top, p->value.intVal, attrs->font); + if (attrs->margin.top < 0) // \todo fix negative margins in dw/* + attrs->margin.top = 0; break; case CSS_PROPERTY_PADDING_TOP: computeValue (&attrs->padding.top, p->value.intVal, attrs->font); |