summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2009-08-18 22:42:37 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2009-08-18 22:42:37 +0000
commitae901c2e5040e70fefc053a9a4c2379f917173ce (patch)
tree7019804aeb18fdaa2634ad51e443c948d443aeec
parentbbae89c12e738cd5014385a6331610e7dbf292e9 (diff)
downloadrockbox-ae901c2e5040e70fefc053a9a4c2379f917173ce.zip
rockbox-ae901c2e5040e70fefc053a9a4c2379f917173ce.tar.gz
rockbox-ae901c2e5040e70fefc053a9a4c2379f917173ce.tar.bz2
rockbox-ae901c2e5040e70fefc053a9a4c2379f917173ce.tar.xz
Scrollbar position: only update it when exiting the menu + FS#10539 by Alexander Levin (change the order of Left/Right)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22414 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/gui/bitmap/list.c10
-rw-r--r--apps/settings.h2
-rw-r--r--apps/settings_list.c4
3 files changed, 8 insertions, 8 deletions
diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c
index 578c9ce..bc7bb87 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_position) /* 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_position) /* 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_position) /* 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_position) /* 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_position) /* right*/
return gui_synclist_touchscreen_scrollbar(gui_list, y);
/* |--------------------------------------------------------|
diff --git a/apps/settings.h b/apps/settings.h
index c33b715..2f2086f 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -769,7 +769,7 @@ struct user_settings
unsigned char remote_ui_vp_config[64]; /* viewport string for the remote lists */
#endif
int scrollbar_width;
- bool scrollbar_position; /* true=left false=right */
+ bool scrollbar_position; /* false=left true=right */
#endif
#if CONFIG_CODEC == SWCODEC
diff --git a/apps/settings_list.c b/apps/settings_list.c
index 73c39bf..3d3b888 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -608,8 +608,8 @@ const struct settings_list settings[] = {
OFFON_SETTING(0,scrollbar, LANG_SCROLL_BAR, true, "scrollbar", NULL),
INT_SETTING(0, scrollbar_width, LANG_SCROLLBAR_WIDTH, 6, "scrollbar width",
UNIT_INT, 3, LCD_WIDTH/10, 1, NULL, NULL, NULL),
- BOOL_SETTING(0, scrollbar_position, LANG_SCROLLBAR_POSITION, true,
- "scrollbar pos", "left,right", LANG_LEFT, LANG_RIGHT, NULL),
+ BOOL_SETTING(F_TEMPVAR, scrollbar_position, LANG_SCROLLBAR_POSITION, false,
+ "scrollbar pos", "left,right", LANG_RIGHT, LANG_LEFT, NULL),
#if CONFIG_KEYPAD == RECORDER_PAD
OFFON_SETTING(0,buttonbar, LANG_BUTTON_BAR ,true,"buttonbar", NULL),
#endif