diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-12-11 23:31:03 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-12-11 23:31:03 +0100 |
commit | c320585dddc168f79fe502dfa504fcec188b2329 (patch) | |
tree | 13a7c70e8b63d4c9f7e8868ada8048c416486318 /src/html.cc | |
parent | 8e34df3e95fb93b1857c9881d49b6aca46e159e9 (diff) |
always use shaded colors
This makes things much simpler and improves sharing of colors.
If computing two more shades really proves to be a performance
issue, we can shade on demand without exposing this optimization
to the interface.
Diffstat (limited to 'src/html.cc')
-rw-r--r-- | src/html.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/html.cc b/src/html.cc index 72bc7cca..4cb05756 100644 --- a/src/html.cc +++ b/src/html.cc @@ -1766,9 +1766,9 @@ static void Html_tag_open_frame (DilloHtml *html, const char *tag, int tagsize) if (a_Capi_get_flags(url) & CAPI_IsCached) { /* visited frame */ style_attrs.color = - Color::createSimple (HT2LT(html), html->visited_color); + Color::create (HT2LT(html), html->visited_color); } else { /* unvisited frame */ - style_attrs.color = Color::createSimple (HT2LT(html), html->link_color); + style_attrs.color = Color::create (HT2LT(html), html->link_color); } style_attrs.textDecoration |= TEXT_DECORATION_UNDERLINE; style_attrs.x_link = Html_set_new_link(html, &url); @@ -2136,10 +2136,10 @@ static void Html_tag_open_img(DilloHtml *html, const char *tag, int tagsize) if (html->styleEngine->style ()->x_link != -1) { /* In this case we can use the text color */ style_attrs.setBorderColor ( - Color::createShaded (HT2LT(html), style_attrs.color->getColor())); + Color::create (HT2LT(html), style_attrs.color->getColor())); } else { style_attrs.setBorderColor ( - Color::createShaded (HT2LT(html), html->link_color)); + Color::create (HT2LT(html), html->link_color)); } style_attrs.setBorderStyle (BORDER_SOLID); style_attrs.borderWidth.setVal (border); @@ -2336,7 +2336,7 @@ static void Html_tag_open_object(DilloHtml *html, const char *tag, int tagsize) style_attrs = *html->styleEngine->style (); if (a_Capi_get_flags(url) & CAPI_IsCached) { - style_attrs.color = Color::createSimple ( + style_attrs.color = Color::create ( HT2LT(html), html->visited_color /* @@ -2348,8 +2348,7 @@ static void Html_tag_open_object(DilloHtml *html, const char *tag, int tagsize) */ ); } else { - style_attrs.color = Color::createSimple(HT2LT(html), - html->link_color); + style_attrs.color = Color::create (HT2LT(html), html->link_color); } style_attrs.textDecoration |= TEXT_DECORATION_UNDERLINE; |