[Bf-blender-cvs] [e0da0a1] master: Fix menu aliged to right side of screen in UserPref window

Julian Eisel noreply at git.blender.org
Fri Mar 4 16:55:16 CET 2016


Commit: e0da0a1492bf03e5fc1d4646b399ca540a6716fb
Author: Julian Eisel
Date:   Fri Mar 4 16:44:38 2016 +0100
Branches: master
https://developer.blender.org/rBe0da0a1492bf03e5fc1d4646b399ca540a6716fb

Fix menu aliged to right side of screen in UserPref window

Only applied in a really few cases actually.

To reproduce:
* Open User Preferences *in own window*
* Search for node wrangler add-on (it's one of the few cases where this happens)
* Enable and open details
* Click on one of the menues in the add-on preferences

Actually this was reproducable in any window, user preference area just had to take up most/all of the width.

Note: I'm not totally sure if just disabling these lines is correct, but I didn't find any issues or any information why this was needed. So it seems to be redundant.

===================================================================

M	source/blender/editors/interface/interface_regions.c

===================================================================

diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 4a3500e..abd395a 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -1621,7 +1621,8 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but,
 				// yof = ysize; (not with menu scrolls)
 			}
 		}
-		
+
+#if 0 /* seems redundant and causes issues with blocks inside big regions */
 		/* or no space left or right */
 		if (left == 0 && right == 0) {
 			if (dir1 == UI_DIR_UP || dir1 == UI_DIR_DOWN) {
@@ -1629,7 +1630,8 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but,
 				xof = -block->rect.xmin + 5;
 			}
 		}
-		
+#endif
+
 #if 0
 		/* clamp to window bounds, could be made into an option if its ever annoying */
 		if (     (offscreen = (block->rect.ymin + yof)) < 0) yof -= offscreen;   /* bottom */




More information about the Bf-blender-cvs mailing list