Fix: Quick Tooltip Position Can Jiggle
Quick tooltips immediately show a word or two and then shows more detailed information after a pause. It is possible to have these two things shows at differing positions (vertically or horizontally) and therefore jiggle. Some padding code uses the width and height and half of a padding amount, which can result in differing values if the first width or height is an odd amount but the second is even, or vice versa. This happens quite infrequently and depends on the user scale. This PR just replaces one line that does the padding in a way that results in consistent values. Pull Request: https://projects.blender.org/blender/blender/pulls/148019
This commit is contained in:
committed by
Harley Acheson
parent
63d65bebf0
commit
1ae52b6bd0
@@ -1606,7 +1606,7 @@ static ARegion *ui_tooltip_create_with_data(bContext *C,
|
||||
#undef USE_ALIGN_Y_CENTER
|
||||
|
||||
/* add padding */
|
||||
BLI_rcti_resize(&rect_i, BLI_rcti_size_x(&rect_i) + pad_x, BLI_rcti_size_y(&rect_i) + pad_y);
|
||||
BLI_rcti_pad(&rect_i, int(round(pad_x * 0.5f)), int(round(pad_y * 0.5f)));
|
||||
|
||||
/* widget rect, in region coords */
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user