[Bf-blender-cvs] [4b206af] master: Fix T37847: some buttons displayed too wide in multi-column menus.
Brecht Van Lommel
noreply at git.blender.org
Wed Dec 18 19:35:31 CET 2013
Commit: 4b206af1c966119f5ce7b0ccf7f9d681a9032f7a
Author: Brecht Van Lommel
Date: Wed Dec 18 19:33:54 2013 +0100
http://developer.blender.org/rB4b206af1c966119f5ce7b0ccf7f9d681a9032f7a
Fix T37847: some buttons displayed too wide in multi-column menus.
===================================================================
M source/blender/editors/interface/interface.c
===================================================================
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 266b063..d09b3de 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;
}
More information about the Bf-blender-cvs
mailing list