Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_region_popup.c
| Show First 20 Lines • Show All 720 Lines • ▼ Show 20 Lines | else { | ||||
| handle->prev_block_rect = block->rect; | handle->prev_block_rect = block->rect; | ||||
| /* the block and buttons were positioned in window space as in 2.4x, now | /* the block and buttons were positioned in window space as in 2.4x, now | ||||
| * these menu blocks are regions so we bring it back to region space. | * these menu blocks are regions so we bring it back to region space. | ||||
| * additionally we add some padding for the menu shadow or rounded menus */ | * additionally we add some padding for the menu shadow or rounded menus */ | ||||
| region->winrct.xmin = block->rect.xmin - margin; | region->winrct.xmin = block->rect.xmin - margin; | ||||
| region->winrct.xmax = block->rect.xmax + margin; | region->winrct.xmax = block->rect.xmax + margin; | ||||
| region->winrct.ymin = block->rect.ymin - margin; | region->winrct.ymin = block->rect.ymin - margin; | ||||
| region->winrct.ymax = block->rect.ymax + UI_POPUP_MENU_TOP; | region->winrct.ymax = block->rect.ymax + margin; | ||||
| UI_block_translate(block, -region->winrct.xmin, -region->winrct.ymin); | UI_block_translate(block, -region->winrct.xmin, -region->winrct.ymin); | ||||
| /* apply scroll offset */ | /* apply scroll offset */ | ||||
| if (handle->scrolloffset != 0.0f) { | if (handle->scrolloffset != 0.0f) { | ||||
| LISTBASE_FOREACH (uiBut *, bt, &block->buttons) { | LISTBASE_FOREACH (uiBut *, bt, &block->buttons) { | ||||
| bt->rect.ymin += handle->scrolloffset; | bt->rect.ymin += handle->scrolloffset; | ||||
| bt->rect.ymax += handle->scrolloffset; | bt->rect.ymax += handle->scrolloffset; | ||||
| ▲ Show 20 Lines • Show All 120 Lines • Show Last 20 Lines | |||||