diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2013-12-18 22:33:54 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2013-12-18 22:35:13 +0400 |
commit | 4b206af1c966119f5ce7b0ccf7f9d681a9032f7a (patch) | |
tree | 8a0e78ab1cc6ba5e1deacfd0363c125ee88ecdd6 | |
parent | 3f2f7091d62875844300f9b63bb69734369abd23 (diff) |
Fix T37847: some buttons displayed too wide in multi-column menus.
-rw-r--r-- | source/blender/editors/interface/interface.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 266b0637c27..d09b3dea98a 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -230,13 +230,7 @@ static void ui_text_bounds_block(uiBlock *block, float offset) /* cope with multi collumns */ bt = block->buttons.first; while (bt) { - if (bt->next && bt->rect.xmin < bt->next->rect.xmin) { - nextcol = 1; - col++; - } - else { - nextcol = 0; - } + nextcol = (bt->next && bt->rect.xmin < bt->next->rect.xmin); bt->rect.xmin = x1addval; bt->rect.xmax = bt->rect.xmin + i + block->bounds; @@ -247,8 +241,10 @@ static void ui_text_bounds_block(uiBlock *block, float offset) ui_check_but(bt); /* clips text again */ - if (nextcol) + if (nextcol) { x1addval += i + block->bounds; + col++; + } bt = bt->next; } |