if( temp_display_format == LISTBOX_ICON_LIST ) {
for( int i=0; i<data[0].size(); ++i ) {
if( data[0].get(i)->icon ) {
- if( data[0].get(i)->icon->get_h() > row_height )
- row_height = data[0].get(i)->icon->get_h();
+ int icon_h = data[0].get(i)->icon->get_h() + 2*ICON_MARGIN;
+ if( row_height < icon_h ) row_height = icon_h;
}
}
}
case LISTBOX_ICONS:
case LISTBOX_ICONS_PACKED:
case LISTBOX_ICON_LIST: {
- x = get_item_x(item);
- y = get_item_y(item);
- w = get_icon_w(item) + ICON_MARGIN * 2;
- h = get_icon_h(item) + ICON_MARGIN * 2;
+ x = get_item_x(item) + ICON_MARGIN;
+ y = get_item_y(item) + ICON_MARGIN;
+ w = get_icon_w(item) + ICON_MARGIN;
+ h = get_icon_h(item) + ICON_MARGIN;
break; }
case LISTBOX_TEXT:
default: {