summaryrefslogtreecommitdiff
path: root/apps/gui/bitmap/list.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/bitmap/list.c')
-rw-r--r--apps/gui/bitmap/list.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c
index efca22832d..79df35b363 100644
--- a/apps/gui/bitmap/list.c
+++ b/apps/gui/bitmap/list.c
@@ -135,9 +135,8 @@ void list_draw(struct screen *display, struct gui_synclist *list)
135 start = list->start_item[screen]; 135 start = list->start_item[screen];
136 end = start + viewport_get_nb_lines(&list_text[screen]); 136 end = start + viewport_get_nb_lines(&list_text[screen]);
137 137
138 scrollbar_in_left = 138 scrollbar_in_left = (global_settings.scrollbar == SCROLLBAR_LEFT);
139 (!is_rtl && global_settings.scrollbar == SCROLLBAR_SHOW) || 139
140 (is_rtl && global_settings.scrollbar == SCROLLBAR_SHOW_OPPOSITE);
141 /* draw the scrollbar if its needed */ 140 /* draw the scrollbar if its needed */
142 if (global_settings.scrollbar && 141 if (global_settings.scrollbar &&
143 viewport_get_nb_lines(&list_text[screen]) < list->nb_items) 142 viewport_get_nb_lines(&list_text[screen]) < list->nb_items)
@@ -358,15 +357,13 @@ unsigned gui_synclist_do_touchscreen(struct gui_synclist * gui_list)
358 return ACTION_NONE; 357 return ACTION_NONE;
359 } 358 }
360 /* Scroll bar */ 359 /* Scroll bar */
361 /* TODO: Support RTL mode */ 360 else if(global_settings.scrollbar == SCROLLBAR_LEFT)
362 else if(global_settings.scrollbar == SCROLLBAR_SHOW)
363 return gui_synclist_touchscreen_scrollbar(gui_list, y); 361 return gui_synclist_touchscreen_scrollbar(gui_list, y);
364 } 362 }
365 else 363 else
366 { 364 {
367 /* TODO: Support RTL mode */
368 if(x>list_text[screen].x+list_text[screen].width && 365 if(x>list_text[screen].x+list_text[screen].width &&
369 global_settings.scrollbar == SCROLLBAR_SHOW_OPPOSITE) 366 global_settings.scrollbar == SCROLLBAR_RIGHT)
370 return gui_synclist_touchscreen_scrollbar(gui_list, y); 367 return gui_synclist_touchscreen_scrollbar(gui_list, y);
371 368
372 /* |--------------------------------------------------------| 369 /* |--------------------------------------------------------|
@@ -414,8 +411,7 @@ unsigned gui_synclist_do_touchscreen(struct gui_synclist * gui_list)
414 an item when he wanted to use the scrollbar, due to touchscreen 411 an item when he wanted to use the scrollbar, due to touchscreen
415 dead zones) 412 dead zones)
416 */ 413 */
417 /* TODO: Support RTL mode */ 414 if(global_settings.scrollbar == SCROLLBAR_RIGHT &&
418 if(global_settings.scrollbar == SCROLLBAR_SHOW_OPPOSITE &&
419 x > list_text[screen].x + list_text[screen].width - 415 x > list_text[screen].x + list_text[screen].width -
420 get_icon_width(SCREEN_MAIN)) 416 get_icon_width(SCREEN_MAIN))
421 return ACTION_NONE; 417 return ACTION_NONE;