Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_templates.c
| Show First 20 Lines • Show All 6,123 Lines • ▼ Show 20 Lines | if (columns > 1) { | ||||
| dyn_data->height = (int)ceil((double)items->tot_items / (double)columns); | dyn_data->height = (int)ceil((double)items->tot_items / (double)columns); | ||||
| activei_row = (int)floor((double)items->active_item_idx / (double)columns); | activei_row = (int)floor((double)items->active_item_idx / (double)columns); | ||||
| } | } | ||||
| else { | else { | ||||
| dyn_data->height = items->tot_items; | dyn_data->height = items->tot_items; | ||||
| activei_row = items->active_item_idx; | activei_row = items->active_item_idx; | ||||
| } | } | ||||
| dyn_data->columns = columns; | |||||
| if (!use_auto_size) { | if (!use_auto_size) { | ||||
| /* No auto-size, yet we clamp at min size! */ | /* No auto-size, yet we clamp at min size! */ | ||||
| actual_rows = max_ii(ui_list->list_grip, actual_rows); | actual_rows = max_ii(ui_list->list_grip, actual_rows); | ||||
| } | } | ||||
| else if ((actual_rows != actual_maxrows) && (dyn_data->height > actual_rows)) { | else if ((actual_rows != actual_maxrows) && (dyn_data->height > actual_rows)) { | ||||
| /* Expand size if needed and possible. */ | /* Expand size if needed and possible. */ | ||||
| actual_rows = min_ii(dyn_data->height, actual_maxrows); | actual_rows = min_ii(dyn_data->height, actual_maxrows); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,592 Lines • Show Last 20 Lines | |||||