Cleanup: replace comments with meaningful variable names
authorCampbell Barton <ideasman42@gmail.com>
Wed, 17 Apr 2019 07:05:56 +0000 (09:05 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 17 Apr 2019 07:17:55 +0000 (09:17 +0200)
source/blender/editors/interface/interface_layout.c

index c834ea31bd42f665b71cb5e75f580ddf48955afe..a89d161b708b1cdf508b5a72798750cb83230767 100644 (file)
@@ -3742,9 +3742,10 @@ static void ui_litem_layout_column_flow(uiLayout *litem)
       emy = 0; /* need to reset height again for next column */
       col++;
 
-      /*  (<     remaining width     > - <      space between remaining columns      >) / <remamining columns > */
-      w = ((litem->w - (x - litem->x)) - (flow->totcol - col - 1) * style->columnspace) /
-          (flow->totcol - col);
+      const int remaining_width = litem->w - (x - litem->x);
+      const int remaining_width_between_columns = (flow->totcol - col - 1) * style->columnspace;
+      const int remaining_columns = flow->totcol - col;
+      w = (remaining_width - remaining_width_between_columns) / remaining_columns;
     }
   }