From 64b4db4a128e31c983521b5f435d43c415fecae5 Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Fri, 10 Oct 2025 20:04:27 +0200 Subject: [PATCH] Fix #147765: Padding of Quick Tooltips Some tooltips pop up up instantly with just a word or two and then expand later to show more information, for example for the Properties categories. This type of tooltip is not considering padding when clamping to the window bounds, making it possible for them to be positioned in such a way that clips some content. This PR just adds padding to the window bounds. Pull Request: https://projects.blender.org/blender/blender/pulls/147835 --- .../editors/interface/regions/interface_region_tooltip.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/blender/editors/interface/regions/interface_region_tooltip.cc b/source/blender/editors/interface/regions/interface_region_tooltip.cc index abc2914daea..79718fb973f 100644 --- a/source/blender/editors/interface/regions/interface_region_tooltip.cc +++ b/source/blender/editors/interface/regions/interface_region_tooltip.cc @@ -1509,10 +1509,10 @@ static ARegion *ui_tooltip_create_with_data(bContext *C, init_rect.ymin = init_rect_overlap->ymin - pad; init_rect.ymax = init_rect_overlap->ymax + pad; rcti rect_clamp; - rect_clamp.xmin = 0; - rect_clamp.xmax = win_size[0]; - rect_clamp.ymin = 0; - rect_clamp.ymax = win_size[1]; + rect_clamp.xmin = pad_x + pad; + rect_clamp.xmax = win_size[0] - pad_x - pad; + rect_clamp.ymin = pad_y + pad; + rect_clamp.ymax = win_size[1] - pad_y - pad; /* try right. */ const int size_x = BLI_rcti_size_x(&rect_i); const int size_y = BLI_rcti_size_y(&rect_i);