diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-01 10:23:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-01 10:23:51 +0300 |
commit | bc95c7a3ea6fbcfbee43bd61c0a709de0d0daf26 (patch) | |
tree | 235b6a984cc2132d3074148f0bd64b573624eb9a /source | |
parent | 1c0aa4e396d07729e02dba2b7a939138315bd402 (diff) |
Cleanup: remove num argument prefix
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 12 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_ui_api.c | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 63f51b991ae..a89f91a6b59 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -186,7 +186,7 @@ typedef struct uiLayoutItemGridFlow { /* If positive, absolute fixed number of columns. * If 0, fully automatic (based on available width). * If negative, automatic but only generates number of columns/rows multiple of given (absolute) value. */ - int num_columns; + int columns_len; /* Pure internal runtime storage. */ int tot_items, tot_columns, tot_rows; @@ -3200,8 +3200,8 @@ static void ui_litem_estimate_grid_flow(uiLayout *litem) /* Even in varying column width case, we fix our columns number from weighted average width of items, * a proper solving of required width would be too costly, and this should give reasonably good results * in all resonable cases... */ - if (gflow->num_columns > 0) { - gflow->tot_columns = gflow->num_columns; + if (gflow->columns_len > 0) { + gflow->tot_columns = gflow->columns_len; } else { if (avg_w == 0.0f) { @@ -3218,7 +3218,7 @@ static void ui_litem_estimate_grid_flow(uiLayout *litem) * Note that modulo does not prevent ending with fewer columns/rows than modulo, if mandatory * to avoid empty column/row. */ { - const int modulo = (gflow->num_columns < -1) ? -gflow->num_columns : 0; + const int modulo = (gflow->columns_len < -1) ? -gflow->columns_len : 0; const int step = modulo ? modulo : 1; if (gflow->row_major) { @@ -3580,7 +3580,7 @@ uiLayout *uiLayoutColumnFlow(uiLayout *layout, int number, int align) } uiLayout *uiLayoutGridFlow( - uiLayout *layout, int row_major, int num_columns, int even_columns, int even_rows, int align) + uiLayout *layout, int row_major, int columns_len, int even_columns, int even_rows, int align) { uiLayoutItemGridFlow *flow; @@ -3590,7 +3590,7 @@ uiLayout *uiLayoutGridFlow( flow->litem.space = (flow->litem.align) ? 0 : layout->root->style->columnspace; flow->row_major = row_major; - flow->num_columns = num_columns; + flow->columns_len = columns_len; flow->even_columns = even_columns; flow->even_rows = even_rows; diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c index f960cff1cd2..95b869940c5 100644 --- a/source/blender/makesrna/intern/rna_ui_api.c +++ b/source/blender/makesrna/intern/rna_ui_api.c @@ -520,7 +520,7 @@ void RNA_api_ui_layout(StructRNA *srna) func = RNA_def_function(srna, "grid_flow", "uiLayoutGridFlow"); RNA_def_boolean(func, "row_major", false, "", "Fill row by row, instead of column by column"); - RNA_def_int(func, "num_columns", 0, INT_MIN, INT_MAX, "", + RNA_def_int(func, "columns", 0, INT_MIN, INT_MAX, "", "Number of columns, positive are absolute fixed numbers, 0 is automatic, negative are " "automatic multiple numbers along major axis (e.g. -2 will only produce 2, 4, 6 etc. " "columns for row major layout, and 2, 4, 6 etc. rows for column major layout)", |