Mercurial > audlegacy
comparison src/audacious/ui_skinned_playlist.c @ 4422:3bf0124ffd2b
fix my previous commit
author | Tomasz Mon <desowin@gmail.com> |
---|---|
date | Tue, 01 Apr 2008 22:23:35 +0200 |
parents | ae628568ea94 |
children | 60f53670478a |
comparison
equal
deleted
inserted
replaced
4421:ae628568ea94 | 4422:3bf0124ffd2b |
---|---|
506 /* Reset */ | 506 /* Reset */ |
507 list = playlist->entries; | 507 list = playlist->entries; |
508 list = g_list_nth(list, pl->first); | 508 list = g_list_nth(list, pl->first); |
509 | 509 |
510 for (i = pl->first; | 510 for (i = pl->first; |
511 list && i <= pl->first + pl->num_visible; | 511 list && i < pl->first + pl->num_visible; |
512 list = g_list_next(list), i++) { | 512 list = g_list_next(list), i++) { |
513 entry = list->data; | 513 entry = list->data; |
514 | 514 |
515 if (entry->selected && !in_selection) { | 515 if (entry->selected && !in_selection) { |
516 yc = ((i - pl->first) * pl->fheight); | 516 yc = ((i - pl->first) * pl->fheight); |
525 0 + width, yc + 0.5, 0 + width, yc + rounding_offset); | 525 0 + width, yc + 0.5, 0 + width, yc + rounding_offset); |
526 | 526 |
527 in_selection = TRUE; | 527 in_selection = TRUE; |
528 } | 528 } |
529 | 529 |
530 if ((!entry->selected || !g_list_next(list)) && in_selection) { | 530 if ((!entry->selected || i == pl->first + pl->num_visible - 1) |
531 && in_selection) { | |
532 | |
531 if (!entry->selected) | 533 if (!entry->selected) |
532 yc = (((i - 1) - pl->first) * pl->fheight); | 534 yc = (((i - 1) - pl->first) * pl->fheight); |
533 else /* !g_list_next(list) */ | 535 else /* last visible item */ |
534 yc = ((i - pl->first) * pl->fheight); | 536 yc = ((i - pl->first) * pl->fheight); |
535 | 537 |
536 cairo_line_to(cr, 0 + width, yc + pl->fheight - (rounding_offset * 2)); | 538 cairo_line_to(cr, 0 + width, yc + pl->fheight - (rounding_offset * 2)); |
537 cairo_curve_to (cr, 0 + width, yc + pl->fheight - rounding_offset, | 539 cairo_curve_to (cr, 0 + width, yc + pl->fheight - rounding_offset, |
538 0 + width, yc + pl->fheight - 0.5, | 540 0 + width, yc + pl->fheight - 0.5, |