summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorNicolas Pennequin <nicolas.pennequin@free.fr>2007-09-28 13:49:43 +0000
committerNicolas Pennequin <nicolas.pennequin@free.fr>2007-09-28 13:49:43 +0000
commit49a9e1ef35085dd1b348bb7949f32cd4db043506 (patch)
tree0b3344dc8c91ef9b52f13520024a5d16dc6a16a8 /firmware
parentf333c97176bfed3c66c44e44d28ad84d99bc071f (diff)
downloadrockbox-49a9e1ef35085dd1b348bb7949f32cd4db043506.tar.gz
rockbox-49a9e1ef35085dd1b348bb7949f32cd4db043506.zip
Make the gradient look better when more than one line is selected (running time, ID3 info, cuesheet viewer...). I haven't found a solution for scrolling yet, so that won't look too good.
The recording screen code needs a bit of adapting too, but I don't have a target to test on, so leave it for now. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14884 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/lcd-16bit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/firmware/drivers/lcd-16bit.c b/firmware/drivers/lcd-16bit.c
index 2d228b6566..f748b4027c 100644
--- a/firmware/drivers/lcd-16bit.c
+++ b/firmware/drivers/lcd-16bit.c
@@ -529,6 +529,8 @@ void lcd_fillrect(int x, int y, int width, int height)
/* Fill a rectangle with a gradient */
void lcd_gradient_rect(int x1, int x2, int y, int h)
{
+ if (h == 0) return;
+
int h_r = RGB_UNPACK_RED(lss_pattern) << 16;
int h_b = RGB_UNPACK_BLUE(lss_pattern) << 16;
int h_g = RGB_UNPACK_GREEN(lss_pattern) << 16;
@@ -861,7 +863,7 @@ void lcd_puts_style_offset(int x, int y, const unsigned char *str, int style,
if (style & STYLE_GRADIENT) {
drawmode = DRMODE_FG;
- lcd_gradient_rect(xpos, LCD_WIDTH, ypos, h);
+ lcd_gradient_rect(xpos, LCD_WIDTH, ypos, h*(style & STYLE_COLOR_MASK));
fg_pattern = lst_pattern;
}
else if (style & STYLE_COLORBAR) {