Page MenuHome

Fix T83935: Extra operator icons have mouse over detecting rect misaligned
AbandonedPublic

Authored by Vincent Blankfield (vvv) on Dec 19 2020, 11:02 PM.

Details

Summary

ui_but_extra_operator_icon_mouse_over_get and widget_draw_extra_icons used to calculate the icon positions differently. This patch gets the calculations in sync.

Diff Detail

Repository
rB Blender

Event Timeline

Vincent Blankfield (vvv) requested review of this revision.Dec 19 2020, 11:02 PM
Vincent Blankfield (vvv) created this revision.
source/blender/editors/interface/interface_handlers.c
4219

ICON_SIZE_FROM_BUTRECT is interface_widgets.c and unavailable here.

source/blender/editors/interface/interface_widgets.c
2256

Not sure what is it for, but it's unavailable in ui_but_extra_operator_icon_mouse_over_get, so not using here either.

2264

In the worst case, if the macro gets changed, at least we stay in sync with ui_but_extra_operator_icon_mouse_over_get. Can't use ICON_SIZE_FROM_BUTRECT in interface_handlers.c, so not using here.

Forgot to change back the alpha after testing.

There's something wrong with this patch, so I created another one. D9936

Julian Eisel (Severin) requested changes to this revision.Dec 27 2020, 5:55 PM

I think the problems come from using the button rectangle directly (rather than the passed in rect, which uses a different coordinate space) and from not modifying the input/output parameter rect.

We have the luxury problem that there are two patches for this now. D9936 looks fine so we'll go with this. Thanks a lot for the patch nevertheless.

This revision now requires changes to proceed.Dec 27 2020, 5:55 PM