UI: Position of Tooltips for Labels #117879

Merged
Harley Acheson merged 1 commits from Harley/blender:LabelTooltipPos into main 2024-03-14 21:35:22 +01:00
1 changed files with 4 additions and 0 deletions

View File

@ -1441,6 +1441,10 @@ ARegion *UI_tooltip_create_from_button_or_extra_icon(
}
BLI_rcti_rctf_copy_round(&init_rect, &overlap_rect_fl);
}
else if (but->type == UI_BTYPE_LABEL && BLI_rctf_size_y(&but->rect) > UI_UNIT_Y) {
init_position[0] = win->eventstate->xy[0];
init_position[1] = win->eventstate->xy[1] - (UI_POPUP_MARGIN / 2);
}
else {
init_position[0] = BLI_rctf_cent_x(&but->rect);
init_position[1] = but->rect.ymin;