summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorHristo Kovachev <bger@rockbox.org>2006-04-04 07:01:24 +0000
committerHristo Kovachev <bger@rockbox.org>2006-04-04 07:01:24 +0000
commit23dc42ce459c9bc1fdc191b4e964ea7c7fd56153 (patch)
tree8b7e36c1089d9553c9d539d427142a8a79c4772a /apps
parent0f842a16e50c455e0975ca07efba20a99ee1601d (diff)
downloadrockbox-23dc42ce459c9bc1fdc191b4e964ea7c7fd56153.zip
rockbox-23dc42ce459c9bc1fdc191b4e964ea7c7fd56153.tar.gz
rockbox-23dc42ce459c9bc1fdc191b4e964ea7c7fd56153.tar.bz2
rockbox-23dc42ce459c9bc1fdc191b4e964ea7c7fd56153.tar.xz
Use the display->width property instead of the hardcoded LCD_WIDTH. Now the quickscreen is displayed correctly on the LCD remotes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9482 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/gui/quickscreen.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/apps/gui/quickscreen.c b/apps/gui/quickscreen.c
index 0cee6fd..24ab725 100644
--- a/apps/gui/quickscreen.c
+++ b/apps/gui/quickscreen.c
@@ -75,21 +75,22 @@ void gui_quickscreen_draw(struct gui_quickscreen * qs, struct screen * display)
title=(unsigned char *)qs->right_option->title;
snprintf(line_text, sizeof(line_text), "%s %s", title, left_right_title);
display->getstringsize(line_text, &w, NULL);
- if(w > LCD_WIDTH-8)
+ if(w > display->width - 8)
{
display->puts_scroll(2, 2+!statusbar, line_text);
display->mono_bitmap(bitmap_icons_7x8[Icon_FastForward], 1, 24, 7, 8);
}
else
{
- display->putsxy(LCD_WIDTH-w-12, 24, line_text);
- display->mono_bitmap(bitmap_icons_7x8[Icon_FastForward], LCD_WIDTH-8, 24, 7, 8);
+ display->putsxy(display->width - w - 12, 24, line_text);
+ display->mono_bitmap(bitmap_icons_7x8[Icon_FastForward],
+ display->width - 8, 24, 7, 8);
}
display->getstringsize(option, &w, NULL);
- if(w > LCD_WIDTH)
+ if(w > display->width)
display->puts_scroll(0, 3+!statusbar, option);
else
- display->putsxy(LCD_WIDTH-w-12, 32, option);
+ display->putsxy(display->width -w-12, 32, option);
/* Displays the third line of text */
option=(unsigned char *)option_select_get_text(qs->bottom_option, buffer,
@@ -97,17 +98,17 @@ void gui_quickscreen_draw(struct gui_quickscreen * qs, struct screen * display)
title=(unsigned char *)qs->bottom_option->title;
display->getstringsize(title, &w, NULL);
- if(w > LCD_WIDTH)
+ if(w > display->width)
display->puts_scroll(0, 4+!statusbar, line_text);
else
- display->putsxy(LCD_WIDTH/2-w/2, 40, title);
+ display->putsxy(display->width/2-w/2, 40, title);
display->getstringsize(option, &w, NULL);
- if(w > LCD_WIDTH)
+ if(w > display->width)
display->puts_scroll(0, 5+!statusbar, option);
else
- display->putsxy(LCD_WIDTH/2-w/2, 48, option);
- display->mono_bitmap(bitmap_icons_7x8[Icon_DownArrow], LCD_WIDTH/2-4, 56, 7, 8);
+ display->putsxy(display->width/2-w/2, 48, option);
+ display->mono_bitmap(bitmap_icons_7x8[Icon_DownArrow], display->width/2-4, 56, 7, 8);
gui_textarea_update(display);
display->setfont(FONT_UI);