diff options
author | Sven Weidauer <sven.weidauer@gmail.com> | 2011-01-24 13:32:35 +0000 |
---|---|---|
committer | Sven Weidauer <sven.weidauer@gmail.com> | 2011-01-24 13:32:35 +0000 |
commit | 840fb0b9aab4b3d3bd4603a945f0d8ca02f5e473 (patch) | |
tree | a13540d69e0dffa1d0eb38024947b37dedf30f31 /desktop | |
parent | 8cc6b55981e808576d32c37f374716015fafe55b (diff) | |
download | netsurf-840fb0b9aab4b3d3bd4603a945f0d8ca02f5e473.tar.gz netsurf-840fb0b9aab4b3d3bd4603a945f0d8ca02f5e473.tar.bz2 |
History colours as constants r=jmb,vince
svn path=/trunk/netsurf/; revision=11478
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/history_core.c | 4 | ||||
-rw-r--r-- | desktop/plot_style.c | 2 | ||||
-rw-r--r-- | desktop/plot_style.h | 16 |
3 files changed, 19 insertions, 3 deletions
diff --git a/desktop/history_core.c b/desktop/history_core.c index 06b2cc797..ee964ad6d 100644 --- a/desktop/history_core.c +++ b/desktop/history_core.c @@ -616,7 +616,7 @@ bool history_redraw_entry(struct history *history, size_t char_offset; int actual_x; struct history_entry *child; - colour c = entry == history->current ? 0xff0000 : 0x333333; + colour c = entry == history->current ? HISTORY_COLOUR_SELECTED : HISTORY_COLOUR_FOREGROUND; int tailsize = 5; int xoffset = x - x0; int yoffset = y - y0; @@ -647,7 +647,7 @@ bool history_redraw_entry(struct history *history, &char_offset, &actual_x)) return false; - fstyle.background = 0xffffff; + fstyle.background = HISTORY_COLOUR_BACKGROUND; fstyle.foreground = c; fstyle.weight = entry == history->current ? 900 : 400; diff --git a/desktop/plot_style.c b/desktop/plot_style.c index 452075d91..04d2885ff 100644 --- a/desktop/plot_style.c +++ b/desktop/plot_style.c @@ -133,7 +133,7 @@ plot_style_t *plot_style_stroke_lightwbasec = &plot_style_stroke_lightwbasec_sta /** stroke style for history core. */ static plot_style_t plot_style_stroke_history_static = { .stroke_type = PLOT_OP_TYPE_SOLID, - .stroke_colour = 0x333333, + .stroke_colour = HISTORY_COLOUR_LINES, .stroke_width = 2, }; plot_style_t *plot_style_stroke_history = &plot_style_stroke_history_static; diff --git a/desktop/plot_style.h b/desktop/plot_style.h index 1271e138b..e6229e256 100644 --- a/desktop/plot_style.h +++ b/desktop/plot_style.h @@ -156,4 +156,20 @@ extern plot_style_t *plot_style_stroke_lightwbasec; /* Default font style */ extern plot_font_style_t const * const plot_style_font; +#ifndef HISTORY_COLOUR_SELECTED +#define HISTORY_COLOUR_SELECTED 0xFF0000 +#endif + +#ifndef HISTORY_COLOUR_FOREGROUND +#define HISTORY_COLOUR_FOREGROUND 0x333333 +#endif + +#ifndef HISTORY_COLOUR_BACKGROUND +#define HISTORY_COLOUR_BACKGROUND 0xFFFFFF +#endif + +#ifndef HISTORY_COLOUR_LINES +#define HISTORY_COLOUR_LINES HISTORY_COLOUR_FOREGROUND +#endif + #endif |