From e0da0a1492bf03e5fc1d4646b399ca540a6716fb Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Fri, 4 Mar 2016 16:44:38 +0100 Subject: [PATCH] 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. --- source/blender/editors/interface/interface_regions.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 4a3500e72de..abd395afbe0 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 */