Change styles used for plotting local history to make it more obvious what the current page is, along with other minor improvements.

svn path=/trunk/netsurf/; revision=11008
This commit is contained in:
Rob Kendrick 2010-12-05 17:03:37 +00:00
parent bd39b8f0d7
commit 35daa32e80
2 changed files with 5 additions and 3 deletions

View File

@ -616,14 +616,14 @@ bool history_redraw_entry(struct history *history,
size_t char_offset;
int actual_x;
struct history_entry *child;
colour c = entry == history->current ? 0x0000ff : 0x333333;
colour c = entry == history->current ? 0xff0000 : 0x333333;
int tailsize = 5;
int xoffset = x - x0;
int yoffset = y - y0;
plot_style_t pstyle_history_rect = {
.stroke_type = PLOT_OP_TYPE_SOLID,
.stroke_colour = c,
.stroke_width = entry == history->current ? 2 : 1,
.stroke_width = entry == history->current ? 3 : 1,
};
plot_font_style_t fstyle = *plot_style_font;
@ -649,6 +649,7 @@ bool history_redraw_entry(struct history *history,
fstyle.background = 0xffffff;
fstyle.foreground = c;
fstyle.weight = entry == history->current ? 900 : 400;
if (!plot.text(entry->x + xoffset, entry->y + HEIGHT + 12 + yoffset,
entry->page.title, char_offset, &fstyle))

View File

@ -134,13 +134,14 @@ plot_style_t *plot_style_stroke_lightwbasec = &plot_style_stroke_lightwbasec_sta
static plot_style_t plot_style_stroke_history_static = {
.stroke_type = PLOT_OP_TYPE_SOLID,
.stroke_colour = 0x333333,
.stroke_width = 2,
};
plot_style_t *plot_style_stroke_history = &plot_style_stroke_history_static;
/* Generic font style */
static const plot_font_style_t plot_style_font_static = {
.family = PLOT_FONT_FAMILY_SANS_SERIF,
.size = 10 * FONT_SIZE_SCALE,
.size = 8 * FONT_SIZE_SCALE,
.weight = 400,
.flags = FONTF_NONE,
.background = 0xffffff,