- if( item->icon )
- gui->pixmap->draw_pixmap(item->icon,
- icon_x + ICON_MARGIN, icon_y + ICON_MARGIN);
-
- gui->draw_text(text_x + ICON_MARGIN,
- text_y + ICON_MARGIN + get_baseline(item), item->text);
+ VFrame *vicon = item->get_vicon_frame();
+ if( vicon )
+ gui->pixmap->draw_vframe(vicon, icon_x, icon_y);
+ else if( item->icon )
+ gui->pixmap->draw_pixmap(item->icon, icon_x, icon_y);
+ char item_text[BCTEXTLEN];
+ if( display_format == LISTBOX_ICONS_PACKED )
+ gui->truncate_text(item_text, item->text, text_w);
+ else
+ strcpy(item_text, item->text);
+ gui->draw_text(text_x, text_y + get_baseline(item), item_text);