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
This commit is contained in:
parent
c1c86d89c3
commit
0b6f683137
1 changed files with 11 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue