diff options
author | Thomas Martitz <kugel@rockbox.org> | 2014-01-07 22:41:00 +0100 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2014-01-07 22:41:00 +0100 |
commit | 0e6d86e4feb800148c589faa6da4f08c41059c5d (patch) | |
tree | 0290acc14bf1a17138f20b87ae474b3990f02c97 /apps/gui | |
parent | d146970ca1e5c9b0641301d50823d29b2e25c9e4 (diff) | |
download | rockbox-0e6d86e4feb800148c589faa6da4f08c41059c5d.tar.gz rockbox-0e6d86e4feb800148c589faa6da4f08c41059c5d.zip |
Fix a few reds and yellows.
Change-Id: I9ad2aca494f2ea3ca5453082ec5491ec031f9ae5
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/line.c | 7 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_render.c | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/apps/gui/line.c b/apps/gui/line.c index 3d563d171c..c0fb936f27 100644 --- a/apps/gui/line.c +++ b/apps/gui/line.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include "screens.h" | 31 | #include "screens.h" |
32 | #include "settings.h" | 32 | #include "settings.h" |
33 | #include "debug.h" | 33 | #include "debug.h" |
34 | #include "viewport.h" | ||
34 | 35 | ||
35 | #ifdef HAVE_REMOTE_LCD | 36 | #ifdef HAVE_REMOTE_LCD |
36 | #define MAX_LINES (LCD_SCROLLABLE_LINES + LCD_REMOTE_SCROLLABLE_LINES) | 37 | #define MAX_LINES (LCD_SCROLLABLE_LINES + LCD_REMOTE_SCROLLABLE_LINES) |
@@ -278,7 +279,7 @@ static void style_line(struct screen *display, | |||
278 | 279 | ||
279 | switch (style & _STYLE_DECO_MASK) | 280 | switch (style & _STYLE_DECO_MASK) |
280 | { | 281 | { |
281 | #if (LCD_DEPTH > 1 || (defined(LCD_REMOTE_DEPTH) && LCD_REMOTE_DEPTH > 1)) | 282 | #ifdef HAVE_LCD_COLOR |
282 | case STYLE_GRADIENT: | 283 | case STYLE_GRADIENT: |
283 | display->set_drawmode(DRMODE_FG); | 284 | display->set_drawmode(DRMODE_FG); |
284 | display->gradient_fillrect_part(x, y, width, height, | 285 | display->gradient_fillrect_part(x, y, width, height, |
@@ -318,7 +319,7 @@ static void style_line(struct screen *display, | |||
318 | else if (style & (STYLE_GRADIENT|STYLE_COLORBAR)) | 319 | else if (style & (STYLE_GRADIENT|STYLE_COLORBAR)) |
319 | display->set_foreground(line->text_color); | 320 | display->set_foreground(line->text_color); |
320 | else | 321 | else |
321 | display->set_foreground(global_settings.fg_color); | 322 | display->set_foreground(get_viewport_default_colour(display->screen_type, true)); |
322 | } | 323 | } |
323 | #endif | 324 | #endif |
324 | } | 325 | } |
@@ -332,7 +333,7 @@ void vput_line(struct screen *display, | |||
332 | print_line(display, x, y, line, fmt, ap); | 333 | print_line(display, x, y, line, fmt, ap); |
333 | #if (LCD_DEPTH > 1 || (defined(LCD_REMOTE_DEPTH) && LCD_REMOTE_DEPTH > 1)) | 334 | #if (LCD_DEPTH > 1 || (defined(LCD_REMOTE_DEPTH) && LCD_REMOTE_DEPTH > 1)) |
334 | if (display->depth > 1) | 335 | if (display->depth > 1) |
335 | display->set_foreground(global_settings.fg_color); | 336 | display->set_foreground(get_viewport_default_colour(display->screen_type, true)); |
336 | #endif | 337 | #endif |
337 | display->set_drawmode(DRMODE_SOLID); | 338 | display->set_drawmode(DRMODE_SOLID); |
338 | } | 339 | } |
diff --git a/apps/gui/skin_engine/skin_render.c b/apps/gui/skin_engine/skin_render.c index 43914699d6..7d0f42259b 100644 --- a/apps/gui/skin_engine/skin_render.c +++ b/apps/gui/skin_engine/skin_render.c | |||
@@ -105,7 +105,6 @@ static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info, | |||
105 | #ifdef HAVE_LCD_BITMAP | 105 | #ifdef HAVE_LCD_BITMAP |
106 | struct wps_data *data = gwps->data; | 106 | struct wps_data *data = gwps->data; |
107 | bool do_refresh = (element->tag->flags & info->refresh_type) > 0; | 107 | bool do_refresh = (element->tag->flags & info->refresh_type) > 0; |
108 | struct line_desc *linedes = &info->line_desc; | ||
109 | #endif | 108 | #endif |
110 | switch (token->type) | 109 | switch (token->type) |
111 | { | 110 | { |
@@ -132,6 +131,7 @@ static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info, | |||
132 | * come before the text style tag color fields need to be preserved */ | 131 | * come before the text style tag color fields need to be preserved */ |
133 | if (data->style & STYLE_GRADIENT) | 132 | if (data->style & STYLE_GRADIENT) |
134 | { | 133 | { |
134 | struct line_desc *linedes = &info->line_desc; | ||
135 | fb_data tc = linedes->text_color, | 135 | fb_data tc = linedes->text_color, |
136 | lc = linedes->line_color, | 136 | lc = linedes->line_color, |
137 | lec = linedes->line_end_color; | 137 | lec = linedes->line_end_color; |
@@ -149,6 +149,7 @@ static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info, | |||
149 | case SKIN_TOKEN_VIEWPORT_GRADIENT_SETUP: | 149 | case SKIN_TOKEN_VIEWPORT_GRADIENT_SETUP: |
150 | { | 150 | { |
151 | struct gradient_config *cfg = SKINOFFSETTOPTR(skin_buffer, token->value.data); | 151 | struct gradient_config *cfg = SKINOFFSETTOPTR(skin_buffer, token->value.data); |
152 | struct line_desc *linedes = &info->line_desc; | ||
152 | linedes->text_color = cfg->text; | 153 | linedes->text_color = cfg->text; |
153 | linedes->line_color = cfg->start; | 154 | linedes->line_color = cfg->start; |
154 | linedes->line_end_color = cfg->end; | 155 | linedes->line_end_color = cfg->end; |