UI: Fix Editor Highlight Top Bar

New editor highlighting (#116684) will sometimes highlight a nearby
area when hovering over the Top Bar. This is caused by the use of the
top-left corner for testing. This just uses the region midpoint
instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/128394
This commit is contained in:
Harley Acheson
2024-09-30 22:17:56 +02:00
committed by Harley Acheson
parent 69a936f9f3
commit 89d7f00ff8

View File

@@ -174,7 +174,7 @@ void ED_screen_draw_edges(wmWindow *win)
if (region) {
/* Find active area from active region. */
const int pos[2] = {region->winrct.xmin, region->winrct.ymin};
const int pos[2] = {BLI_rcti_cent_x(&region->winrct), BLI_rcti_cent_y(&region->winrct)};
active_area = BKE_screen_find_area_xy(screen, SPACE_TYPE_ANY, pos);
}