forked from len0rd/rockbox
Fix FS#7230 - the second line in a multi-line item could be the selected item
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13512 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b2ecf1bc83
commit
195ac12296
1 changed files with 9 additions and 2 deletions
|
|
@ -504,9 +504,16 @@ static void gui_list_select_at_offset(struct gui_list * gui_list, int offset)
|
||||||
int nb_lines = gui_list->display->nb_lines;
|
int nb_lines = gui_list->display->nb_lines;
|
||||||
if (SHOW_LIST_TITLE)
|
if (SHOW_LIST_TITLE)
|
||||||
nb_lines--;
|
nb_lines--;
|
||||||
offset *= gui_list->selected_size;
|
|
||||||
gui_list->selected_item += offset;
|
|
||||||
|
|
||||||
|
if (gui_list->selected_size > 1)
|
||||||
|
{
|
||||||
|
offset *= gui_list->selected_size;
|
||||||
|
/* always select the first item of multi-line lists */
|
||||||
|
offset -= offset%gui_list->selected_size;
|
||||||
|
}
|
||||||
|
gui_list->selected_item += offset;
|
||||||
|
|
||||||
if (offset < 0) /* moving up the list */
|
if (offset < 0) /* moving up the list */
|
||||||
{
|
{
|
||||||
if (gui_list->selected_item < 0)
|
if (gui_list->selected_item < 0)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue