Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-23 09:43:50 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-23 09:51:00 +0300
commitbe3adb51de21652d64a6839cd5614c5096064c6a (patch)
treeb76f6346673205ed3aeb33a4768bd2a182a4c605 /source/blender/editors/include/UI_view2d.h
parent310f288bb03b4197f54b7d7b6d611669f2604d04 (diff)
UI: ignore events in empty region overlap areas
- Resizable areas use 2D view bounds. - Header uses the button bounds. - A margin is added to avoid clicking between buttons. - Region resize edges clamp to the 2D view bounds. Resovles T61554
Diffstat (limited to 'source/blender/editors/include/UI_view2d.h')
-rw-r--r--source/blender/editors/include/UI_view2d.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h
index fde865d4bba..a16c1efd6cf 100644
--- a/source/blender/editors/include/UI_view2d.h
+++ b/source/blender/editors/include/UI_view2d.h
@@ -117,6 +117,9 @@ enum eView2D_Gridlines {
#define IN_2D_VERT_SCROLL(v2d, co) (BLI_rcti_isect_pt_v(&v2d->vert, co))
#define IN_2D_HORIZ_SCROLL(v2d, co) (BLI_rcti_isect_pt_v(&v2d->hor, co))
+#define IN_2D_VERT_SCROLL_RECT(v2d, rct) (BLI_rcti_isect(&v2d->vert, rct, NULL))
+#define IN_2D_HORIZ_SCROLL_RECT(v2d, rct) (BLI_rcti_isect(&v2d->hor, rct, NULL))
+
/* ------------------------------------------ */
/* Type definitions: */
@@ -275,6 +278,13 @@ char UI_view2d_mouse_in_scrollers(const struct ARegion *ar,
const struct View2D *v2d,
int x,
int y);
+char UI_view2d_rect_in_scrollers_ex(const struct ARegion *ar,
+ const struct View2D *v2d,
+ const struct rcti *rect,
+ int *r_scroll);
+char UI_view2d_rect_in_scrollers(const struct ARegion *ar,
+ const struct View2D *v2d,
+ const struct rcti *rect);
/* cached text drawing in v2d, to allow pixel-aligned draw as post process */
void UI_view2d_text_cache_add(