[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33216] trunk/blender/source/blender/ editors/interface/interface.c: Bugfix #24825
Ton Roosendaal
ton at blender.org
Sun Nov 21 18:23:55 CET 2010
Revision: 33216
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33216
Author: ton
Date: 2010-11-21 18:23:55 +0100 (Sun, 21 Nov 2010)
Log Message:
-----------
Bugfix #24825
Error in alignment code caused some buttons to draw not nicely
aligned, like the Frame rate buttons in Render properties.
Modified Paths:
--------------
trunk/blender/source/blender/editors/interface/interface.c
Modified: trunk/blender/source/blender/editors/interface/interface.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface.c 2010-11-21 16:42:05 UTC (rev 33215)
+++ trunk/blender/source/blender/editors/interface/interface.c 2010-11-21 17:23:55 UTC (rev 33216)
@@ -759,6 +759,7 @@
/* widgets */
for(but= block->buttons.first; but; but= but->next) {
ui_but_to_pixelrect(&rect, ar, block, but);
+
if(!(but->flag & UI_HIDDEN) &&
/* XXX: figure out why invalid coordinates happen when closing render window */
/* and material preview is redrawn in main window (temp fix for bug #23848) */
@@ -2212,7 +2213,7 @@
/* clear old flag */
but->flag &= ~UI_BUT_ALIGN;
-
+
if(flag==0) { /* first case */
if(next) {
if(buts_are_horiz(but, next)) {
@@ -2265,10 +2266,10 @@
if( (flag & UI_BUT_ALIGN_TOP)==0) { /* stil top row */
if(prev) {
- if(next && buts_are_horiz(next, but))
- flag = UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_LEFT;
+ if(next && buts_are_horiz(but, next))
+ flag = UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_RIGHT;
else {
- flag = UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_LEFT|UI_BUT_ALIGN_RIGHT;
+ flag = UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_TOP;
}
}
else
@@ -2303,6 +2304,10 @@
/* the previous button is a single one in its row */
but->y2= (prev->y1+but->y2)/2.0;
prev->y1= but->y2;
+
+ but->x1= prev->x1;
+ if(next && buts_are_horiz(but, next)==0)
+ but->x2= prev->x2;
}
else {
/* the previous button is not a single one in its row */
More information about the Bf-blender-cvs
mailing list