comparison src/audacious/ui_skinned_playlist.c @ 4397:d585f103e6ae

fix last playlist item not being highlighted when selected
author mf0102 <0102@gmx.at>
date Sun, 30 Mar 2008 15:57:03 +0200
parents b2f3e74230e7
children de33c83aa06f
comparison
equal deleted inserted replaced
4396:b2f3e74230e7 4397:d585f103e6ae
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
516 if (entry->selected && !in_selection) { 515 if (entry->selected && !in_selection) {
517 yc = ((i - pl->first) * pl->fheight); 516 yc = ((i - pl->first) * pl->fheight);
518 517
519 cairo_new_path(cr); 518 cairo_new_path(cr);
520 519
526 0 + width, yc + 0.5, 0 + width, yc + rounding_offset); 525 0 + width, yc + 0.5, 0 + width, yc + rounding_offset);
527 526
528 in_selection = TRUE; 527 in_selection = TRUE;
529 } 528 }
530 529
531 if (!entry->selected && in_selection) { 530 if ((!entry->selected || !g_list_next(list)) && in_selection) {
532 yc = (((i - 1) - pl->first) * pl->fheight); 531 if (!entry->selected)
532 yc = (((i - 1) - pl->first) * pl->fheight);
533 else /* !g_list_next(list) */
534 yc = ((i - pl->first) * pl->fheight);
533 535
534 cairo_line_to(cr, 0 + width, yc + pl->fheight - (rounding_offset * 2)); 536 cairo_line_to(cr, 0 + width, yc + pl->fheight - (rounding_offset * 2));
535 cairo_curve_to (cr, 0 + width, yc + pl->fheight - rounding_offset, 537 cairo_curve_to (cr, 0 + width, yc + pl->fheight - rounding_offset,
536 0 + width, yc + pl->fheight - 0.5, 538 0 + width, yc + pl->fheight - 0.5,
537 0 + width-rounding_offset, yc + pl->fheight - 0.5); 539 0 + width-rounding_offset, yc + pl->fheight - 0.5);