diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-23 11:47:12 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-23 11:48:50 +0300 |
commit | d886e32270edb8273ec48a41d1bdcef1fe802835 (patch) | |
tree | 05e91cdcada9e6af8869652d93cbb15b7ddb84df /source/blender/editors/interface/interface_align.c | |
parent | 103a31f712649ab901d9508f5ae1a2319fde60b4 (diff) |
Cleanup: strip trailing space from interface files
Diffstat (limited to 'source/blender/editors/interface/interface_align.c')
-rw-r--r-- | source/blender/editors/interface/interface_align.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/interface/interface_align.c b/source/blender/editors/interface/interface_align.c index 500744c366d..36b0b938b5a 100644 --- a/source/blender/editors/interface/interface_align.c +++ b/source/blender/editors/interface/interface_align.c @@ -487,7 +487,7 @@ static void ui_block_align_calc_but(uiBut *first, short nr) { uiBut *prev, *but = NULL, *next; int flag = 0, cols = 0, rows = 0; - + /* auto align */ for (but = first; but && but->alignnr == nr; but = but->next) { @@ -498,7 +498,7 @@ static void ui_block_align_calc_but(uiBut *first, short nr) } /* rows == 0: 1 row, cols == 0: 1 column */ - + /* note; how it uses 'flag' in loop below (either set it, or OR it) is confusing */ for (but = first, prev = NULL; but && but->alignnr == nr; prev = but, but = but->next) { next = but->next; @@ -507,13 +507,13 @@ static void ui_block_align_calc_but(uiBut *first, short nr) /* clear old flag */ but->drawflag &= ~UI_BUT_ALIGN; - + if (flag == 0) { /* first case */ if (next) { if (buts_are_horiz(but, next)) { if (rows == 0) flag = UI_BUT_ALIGN_RIGHT; - else + else flag = UI_BUT_ALIGN_DOWN | UI_BUT_ALIGN_RIGHT; } else { @@ -560,14 +560,14 @@ static void ui_block_align_calc_but(uiBut *first, short nr) flag |= UI_BUT_ALIGN_TOP; } else { /* next button switches to new row */ - + if (prev && buts_are_horiz(prev, but)) flag |= UI_BUT_ALIGN_LEFT; else { flag &= ~UI_BUT_ALIGN_LEFT; flag |= UI_BUT_ALIGN_TOP; } - + if ((flag & UI_BUT_ALIGN_TOP) == 0) { /* still top row */ if (prev) { if (next && buts_are_horiz(but, next)) @@ -577,16 +577,16 @@ static void ui_block_align_calc_but(uiBut *first, short nr) flag = UI_BUT_ALIGN_DOWN | UI_BUT_ALIGN_LEFT; } } - else + else flag |= UI_BUT_ALIGN_DOWN; } - else + else flag |= UI_BUT_ALIGN_TOP; } } - + but->drawflag |= flag; - + /* merge coordinates */ if (prev) { /* simple cases */ @@ -609,7 +609,7 @@ static void ui_block_align_calc_but(uiBut *first, short nr) /* the previous button is a single one in its row */ but->rect.ymax = (prev->rect.ymin + but->rect.ymax) / 2.0f; prev->rect.ymin = but->rect.ymax; - + but->rect.xmin = prev->rect.xmin; if (next && buts_are_horiz(but, next) == 0) but->rect.xmax = prev->rect.xmax; |