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>2015-08-18 07:16:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-08-18 07:16:58 +0300
commit6cee6607a2d3013445dfb9e82a37d6738d199b07 (patch)
tree88b22cea5d6bff85ed57f6646d6fc295108aeeb5 /source/blender/blenlib/intern/rct.c
parenta08f8a4708379290e69ba74ae7abf78e813e0978 (diff)
UI: avoid subtracting shadow from winrct
For popup interactions we need to know if events are in the region or not, however subtracting the shadow isn't so reliable, since its not always added to all sides of a popup. Instead, get the winrct value from a popup using the block rect, otherwise the winrct as-is.
Diffstat (limited to 'source/blender/blenlib/intern/rct.c')
-rw-r--r--source/blender/blenlib/intern/rct.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/rct.c b/source/blender/blenlib/intern/rct.c
index 8de5d2ef172..646613d9a29 100644
--- a/source/blender/blenlib/intern/rct.c
+++ b/source/blender/blenlib/intern/rct.c
@@ -584,6 +584,14 @@ void BLI_rcti_rctf_copy(rcti *dst, const rctf *src)
dst->ymax = dst->ymin + floorf(BLI_rctf_size_y(src) + 0.5f);
}
+void BLI_rcti_rctf_copy_floor(rcti *dst, const rctf *src)
+{
+ dst->xmin = floorf(src->xmin);
+ dst->xmax = floorf(src->xmax);
+ dst->ymin = floorf(src->ymin);
+ dst->ymax = floorf(src->ymax);
+}
+
void BLI_rctf_rcti_copy(rctf *dst, const rcti *src)
{
dst->xmin = src->xmin;