summaryrefslogtreecommitdiff
path: root/apps/gui/bitmap
diff options
context:
space:
mode:
authorAlexander Levin <al.le@rockbox.org>2009-08-19 12:36:40 +0000
committerAlexander Levin <al.le@rockbox.org>2009-08-19 12:36:40 +0000
commit07d0bfd1016f589ddfd5307775ddda3437d04c6f (patch)
treef10ddef1b9d2b213ace5796936f3e0aace43552e /apps/gui/bitmap
parent3943ab07502b51604a5813088ace8ae6e00cb764 (diff)
downloadrockbox-07d0bfd1016f589ddfd5307775ddda3437d04c6f.zip
rockbox-07d0bfd1016f589ddfd5307775ddda3437d04c6f.tar.gz
rockbox-07d0bfd1016f589ddfd5307775ddda3437d04c6f.tar.bz2
rockbox-07d0bfd1016f589ddfd5307775ddda3437d04c6f.tar.xz
Combine the settings for scrollbar on/off and its position into one with three possible values
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22425 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/bitmap')
-rw-r--r--apps/gui/bitmap/list.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c
index bc7bb87..4e3fae8 100644
--- a/apps/gui/bitmap/list.c
+++ b/apps/gui/bitmap/list.c
@@ -130,12 +130,12 @@ void list_draw(struct screen *display, struct gui_synclist *list)
vp = list_text[screen];
vp.width = SCROLLBAR_WIDTH;
list_text[screen].width -= SCROLLBAR_WIDTH;
- if(!global_settings.scrollbar_position) /* left */
+ if(global_settings.scrollbar == SCROLLBAR_LEFT)
list_text[screen].x += SCROLLBAR_WIDTH;
vp.height = line_height *
viewport_get_nb_lines(&list_text[screen]);
vp.x = parent->x;
- if(global_settings.scrollbar_position) /* right */
+ if(global_settings.scrollbar == SCROLLBAR_RIGHT) /* right */
vp.x += list_text[screen].width;
display->set_viewport(&vp);
gui_scrollbar_draw(display, 0, 0, SCROLLBAR_WIDTH-1,
@@ -147,7 +147,7 @@ void list_draw(struct screen *display, struct gui_synclist *list)
else if (show_title)
{
/* shift everything right a bit... */
- if(!global_settings.scrollbar_position) /* left */
+ if(global_settings.scrollbar == SCROLLBAR_LEFT)
{
list_text[screen].width -= SCROLLBAR_WIDTH;
list_text[screen].x += SCROLLBAR_WIDTH;
@@ -341,13 +341,13 @@ unsigned gui_synclist_do_touchscreen(struct gui_synclist * gui_list)
return ACTION_NONE;
}
/* Scroll bar */
- else if(!global_settings.scrollbar_position) /* left */
+ else if(global_settings.scrollbar == SCROLLBAR_LEFT)
return gui_synclist_touchscreen_scrollbar(gui_list, y);
}
else
{
if(x>list_text[screen].x+list_text[screen].width &&
- global_settings.scrollbar_position) /* right*/
+ global_settings.scrollbar == SCROLLBAR_RIGHT)
return gui_synclist_touchscreen_scrollbar(gui_list, y);
/* |--------------------------------------------------------|