Fix hack for height calc.

This commit is contained in:
Dave Davenport 2020-03-30 00:09:28 +02:00
parent ca067234ff
commit c6a405e840
1 changed files with 4 additions and 4 deletions

View File

@ -670,10 +670,10 @@ listview *listview_create ( widget *parent, const char *name, listview_update_ca
listview_create_row ( lv, &row );
// FIXME: hack to scale hight correctly.
if ( lv->eh > 1 && row.textbox ) {
char buff[lv->eh*2+1] ;
memset( buff, '\0', lv->eh*2+1);
for ( unsigned int i = 0; i < lv->eh; i++) { buff[i] ='\n'; };
textbox_text( row.textbox, buff);
char buff[lv->eh*2+1] ;
memset( buff, '\0', lv->eh*2+1);
for ( unsigned int i = 0; i < (lv->eh-1); i++) { buff[i*2] = 'a'; buff[i*2+1] ='\n'; };
textbox_text( row.textbox, buff);
}
lv->element_height = widget_get_desired_height ( WIDGET ( row.box ) );
widget_free ( WIDGET ( row.box ) );