summaryrefslogtreecommitdiff
path: root/desktop/history_core.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-07-21 10:59:53 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-07-21 10:59:53 +0000
commit2565a37a52a5c714e7c6bbd1808db0d6d37c6ea3 (patch)
treef3fe5f224c9e0e4089aca2d9012dfe1a74cf9c90 /desktop/history_core.c
parent1930989f8ccdd574472ed72990b6a82fdcf9d5f4 (diff)
downloadnetsurf-2565a37a52a5c714e7c6bbd1808db0d6d37c6ea3.tar.gz
netsurf-2565a37a52a5c714e7c6bbd1808db0d6d37c6ea3.tar.bz2
Refactor text plotter and other font functions to remove dependency on CSS.
svn path=/trunk/netsurf/; revision=8641
Diffstat (limited to 'desktop/history_core.c')
-rw-r--r--desktop/history_core.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/desktop/history_core.c b/desktop/history_core.c
index a40d746bd..4a30d1783 100644
--- a/desktop/history_core.c
+++ b/desktop/history_core.c
@@ -633,6 +633,7 @@ bool history_redraw_entry(struct history *history,
.stroke_colour = c,
.stroke_width = entry == history->current ? 2 : 1,
};
+ plot_font_style_t fstyle = *plot_style_font;
if (clip) {
if(!plot.clip(x0 + xoffset, y0 + yoffset, x1 + xoffset, y1 + yoffset))
@@ -649,12 +650,16 @@ bool history_redraw_entry(struct history *history,
&pstyle_history_rect))
return false;
- if (!nsfont.font_position_in_string(&css_base_style, entry->page.title,
+ if (!nsfont.font_position_in_string(plot_style_font, entry->page.title,
strlen(entry->page.title), WIDTH,
&char_offset, &actual_x))
return false;
+
+ fstyle.background = 0xffffff;
+ fstyle.foreground = c;
+
if (!plot.text(entry->x + xoffset, entry->y + HEIGHT + 12 + yoffset,
- &css_base_style, entry->page.title, char_offset, 0xffffff, c))
+ entry->page.title, char_offset, &fstyle))
return false;
for (child = entry->forward; child; child = child->next) {