diff options
author | Tomer Shalev <shalev.tomer@gmail.com> | 2009-10-05 13:00:28 +0000 |
---|---|---|
committer | Tomer Shalev <shalev.tomer@gmail.com> | 2009-10-05 13:00:28 +0000 |
commit | 0b6f6831379302a61cb26ac52d4f9a50a9dbdc75 (patch) | |
tree | d4e25c67e3f428e36734a981f9985722074a93d5 /apps/gui | |
parent | c1c86d89c3a46bedbcb3bf841fb8b7bb7bc3e047 (diff) |
Have scollbar in the right side while in RTL mode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22955 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/bitmap/list.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c index 8f5589dd2f..52d4847730 100644 --- a/apps/gui/bitmap/list.c +++ b/apps/gui/bitmap/list.c @@ -142,14 +142,19 @@ void list_draw(struct screen *display, struct gui_synclist *list) struct viewport vp; vp = list_text[screen]; vp.width = SCROLLBAR_WIDTH; - list_text[screen].width -= SCROLLBAR_WIDTH; - if (global_settings.scrollbar == SCROLLBAR_SHOW) - 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 == SCROLLBAR_SHOW_OPPOSITE) + list_text[screen].width -= SCROLLBAR_WIDTH; + if (!is_rtl && global_settings.scrollbar == SCROLLBAR_SHOW || + is_rtl && global_settings.scrollbar == SCROLLBAR_SHOW_OPPOSITE) + { + list_text[screen].x += SCROLLBAR_WIDTH; + } + else + { vp.x += list_text[screen].width; + } display->set_viewport(&vp); gui_scrollbar_draw(display, 0, 0, SCROLLBAR_WIDTH-1, vp.height, list->nb_items, @@ -160,7 +165,8 @@ void list_draw(struct screen *display, struct gui_synclist *list) else if (show_title) { /* shift everything right a bit... */ - if (global_settings.scrollbar == SCROLLBAR_SHOW) + if (!is_rtl && global_settings.scrollbar == SCROLLBAR_SHOW || + is_rtl && global_settings.scrollbar == SCROLLBAR_SHOW_OPPOSITE) { list_text[screen].width -= SCROLLBAR_WIDTH; list_text[screen].x += SCROLLBAR_WIDTH; |