UI: fix popovers not properly working with scroll arrows for long menus.

This commit is contained in:
2018-05-13 18:23:21 +02:00
parent 680bdef12a
commit c40c2b5ab7
6 changed files with 38 additions and 19 deletions

View File

@@ -262,7 +262,7 @@ void ui_region_winrct_get_no_margin(const struct ARegion *ar, struct rcti *r_rec
/* ******************* block calc ************************* */
void ui_block_translate(uiBlock *block, int x, int y)
void UI_block_translate(uiBlock *block, int x, int y)
{
uiBut *but;
@@ -372,7 +372,7 @@ static void ui_block_bounds_calc_centered(wmWindow *window, uiBlock *block)
startx = (xmax * 0.5f) - (width * 0.5f);
starty = (ymax * 0.5f) - (height * 0.5f);
ui_block_translate(block, startx - block->rect.xmin, starty - block->rect.ymin);
UI_block_translate(block, startx - block->rect.xmin, starty - block->rect.ymin);
/* now recompute bounds and safety */
ui_block_bounds_calc(block);
@@ -386,7 +386,7 @@ static void ui_block_bounds_calc_centered_pie(uiBlock *block)
block->pie_data.pie_center_spawned[1]
};
ui_block_translate(block, xy[0], xy[1]);
UI_block_translate(block, xy[0], xy[1]);
/* now recompute bounds and safety */
ui_block_bounds_calc(block);
@@ -446,7 +446,7 @@ static void ui_block_bounds_calc_popup(
rect_bounds.ymax = ymax - UI_POPUP_MENU_TOP;
BLI_rcti_clamp(&rect, &rect_bounds, ofs_dummy);
ui_block_translate(block, rect.xmin - block->rect.xmin, rect.ymin - block->rect.ymin);
UI_block_translate(block, rect.xmin - block->rect.xmin, rect.ymin - block->rect.ymin);
/* now recompute bounds and safety */
ui_block_bounds_calc(block);