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.
This commit is contained in:
Julian Eisel 2016-03-04 16:44:38 +01:00
parent d8b8a6e275
commit e0da0a1492
1 changed files with 4 additions and 2 deletions

View File

@ -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 */