diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-12-11 21:24:21 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-12-11 21:24:21 +0100 |
commit | 3434f5d6af00f3e77a994064554f6ec3aa92e4f0 (patch) | |
tree | 4ff78c89946dbbdb466f1e843aa300b49e14aae3 /src/html.cc | |
parent | 303b90ca689c5f2ce1b1ba60f4edcbbfb9061108 (diff) |
fix <hr> handling
Diffstat (limited to 'src/html.cc')
-rw-r--r-- | src/html.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/html.cc b/src/html.cc index cbb8bdb7..72bc7cca 100644 --- a/src/html.cc +++ b/src/html.cc @@ -2706,19 +2706,17 @@ static void Html_tag_open_hr(DilloHtml *html, const char *tag, int tagsize) props.set (CssProperty::CSS_PROPERTY_BORDER_LEFT_STYLE, BORDER_SOLID); props.set (CssProperty::CSS_PROPERTY_BORDER_RIGHT_STYLE, BORDER_SOLID); - /* \todo handle shaded colors with CSS */ - - if (size < 1) + if (size <= 0) size = 1; } if (size > 0) { CssLength size_top = CSS_CREATE_LENGTH ((size + 1) / 2, CSS_LENGTH_TYPE_PX); - CssLength size_left = CSS_CREATE_LENGTH (size / 2, CSS_LENGTH_TYPE_PX); + CssLength size_bottom = CSS_CREATE_LENGTH (size / 2, CSS_LENGTH_TYPE_PX); props.set (CssProperty::CSS_PROPERTY_BORDER_TOP_WIDTH, size_top); - props.set (CssProperty::CSS_PROPERTY_BORDER_BOTTOM_WIDTH, size_top); - props.set (CssProperty::CSS_PROPERTY_BORDER_LEFT_WIDTH, size_left); - props.set (CssProperty::CSS_PROPERTY_BORDER_RIGHT_WIDTH, size_left); + props.set (CssProperty::CSS_PROPERTY_BORDER_LEFT_WIDTH, size_top); + props.set (CssProperty::CSS_PROPERTY_BORDER_BOTTOM_WIDTH, size_bottom); + props.set (CssProperty::CSS_PROPERTY_BORDER_RIGHT_WIDTH, size_bottom); } DW2TB(html->dw)->addParbreak (5, html->styleEngine->wordStyle ()); |