From 4312b47e83aaa7d54e67e53774ca85140c3a0931 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 24 Apr 2019 11:37:36 +1000 Subject: Fix T63822: Sidebar tabs active area dead-zone #2 Take the entire gutter used for panel tabs into account. Introduced in recent fix for T61554 --- source/blender/editors/include/ED_screen.h | 3 +++ source/blender/editors/include/UI_interface.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index 00771142553..543b2a5781f 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -413,6 +413,9 @@ bool ED_region_overlap_isect_xy_with_margin(const ARegion *ar, const int event_xy[2], const int margin); +bool ED_region_panel_category_gutter_calc_rect(const ARegion *ar, rcti *r_ar_gutter); +bool ED_region_panel_category_gutter_isect_xy(const ARegion *ar, const int event_xy[2]); + bool ED_region_contains_xy(const struct ARegion *ar, const int event_xy[2]); /* interface_region_hud.c */ diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 3b77146b70e..d6cfe7aea1f 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -1622,7 +1622,7 @@ void UI_panels_scale(struct ARegion *ar, float new_width); void UI_panel_label_offset(struct uiBlock *block, int *r_x, int *r_y); int UI_panel_size_y(const struct Panel *pa); -bool UI_panel_category_is_visible(struct ARegion *ar); +bool UI_panel_category_is_visible(const struct ARegion *ar); void UI_panel_category_add(struct ARegion *ar, const char *name); struct PanelCategoryDyn *UI_panel_category_find(struct ARegion *ar, const char *idname); struct PanelCategoryStack *UI_panel_category_active_find(struct ARegion *ar, const char *idname); -- cgit v1.2.3