{
w = get_text_width(MEDIUMFONT, item->text) + LISTBOX_MARGIN * 2;
h = row_height;
+ int ih = get_icon_h(item);
+ if( h < ih ) h = ih;
}
return 0;
}
int BC_ListBox::activate(int take_focus)
{
if( active ) return 0;
+ active = 1;
if( take_focus )
set_active_subwindow(this);
button_releases = 0;
int BC_ListBox::activate(int x, int y, int w, int h)
{
- if( active || !is_popup || gui ) return 0;
+ if( !is_popup || gui ) return 0;
+ active = 1;
if(w != -1) popup_w = w;
if(h != -1) popup_h = h;
reset_query();
- active = 1;
if( y + popup_h > top_level->get_root_h(0) )
y -= get_h() + popup_h;
add_subwindow(gui = new BC_Popup(this,
gui->set_color(row_color);
gui->draw_box(x, y, column_width, h);
gui->set_color(BLACK);
- int yy = y, xx = x + column_width-1;
- gui->draw_line(x, yy, xx, yy);
- yy = y + row_height;
+ int xx = x + column_width-1;
+ gui->draw_line(x, y, xx, y);
+ int hh = row_height;
+ if( display_format == LISTBOX_ICON_LIST ) {
+ int ih = get_icon_h(item);
+ if( ih > hh ) hh = ih;
+ }
+ int yy = y + hh-1;
gui->draw_line(x, yy, xx, yy);
}