Fix T68672: splash screen does not remain centered when window resizes
Differential Revision: https://developer.blender.org/D5508
This commit is contained in:
parent
3f725f10cc
commit
aebc596175
Notes:
blender-bot
2023-02-14 02:22:07 +01:00
Referenced by issue #68672, Splash screen doesn't reposition vertically
|
@ -690,9 +690,11 @@ uiBlock *ui_popup_block_refresh(bContext *C,
|
|||
/* Avoid menu moving down and losing cursor focus by keeping it at
|
||||
* the same height. */
|
||||
if (handle->refresh && handle->prev_block_rect.ymax > block->rect.ymax) {
|
||||
float offset = handle->prev_block_rect.ymax - block->rect.ymax;
|
||||
UI_block_translate(block, 0, offset);
|
||||
block->rect.ymin = handle->prev_block_rect.ymin;
|
||||
if (block->bounds_type != UI_BLOCK_BOUNDS_POPUP_CENTER) {
|
||||
float offset = handle->prev_block_rect.ymax - block->rect.ymax;
|
||||
UI_block_translate(block, 0, offset);
|
||||
block->rect.ymin = handle->prev_block_rect.ymin;
|
||||
}
|
||||
}
|
||||
|
||||
handle->prev_block_rect = block->rect;
|
||||
|
|
Loading…
Reference in New Issue