[Bf-blender-cvs] [ce558a46c10] master: UI: Correct superimposed icon interaction hotspot

Julian Eisel noreply at git.blender.org
Fri Sep 18 18:05:36 CEST 2020


Commit: ce558a46c103cfdc99972ff3e06a430f28874757
Author: Julian Eisel
Date:   Fri Sep 18 17:18:31 2020 +0200
Branches: master
https://developer.blender.org/rBce558a46c103cfdc99972ff3e06a430f28874757

UI: Correct superimposed icon interaction hotspot

The hotspot was slighly too large, which could be apparent in cases
where there are multiple superimposed icons.

===================================================================

M	source/blender/editors/interface/interface_handlers.c

===================================================================

diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index c7f941c9c9a..eb0d18956d9 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -4156,7 +4156,7 @@ static uiButExtraOpIcon *ui_but_extra_operator_icon_mouse_over_get(uiBut *but,
                                                                    const wmEvent *event)
 {
   float xmax = but->rect.xmax;
-  const float icon_size = BLI_rctf_size_y(&but->rect);
+  const float icon_size = 0.8f * BLI_rctf_size_y(&but->rect); /* ICON_SIZE_FROM_BUTRECT */
   int x = event->x, y = event->y;
 
   ui_window_to_block(data->region, but->block, &x, &y);



More information about the Bf-blender-cvs mailing list