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>2012-08-20 19:29:02 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-20 19:29:02 +0400
commit26f073b327ac31d683e1719ce8371b6e28bf01d6 (patch)
treefecb4fdc3f279436ab3814e60266633ba02de50a /source/blender/editors/space_text/text_ops.c
parent831eaf2d7feb63ee6df55a2b00e1d76f793c0a5c (diff)
macros for rectangle center and size
Diffstat (limited to 'source/blender/editors/space_text/text_ops.c')
-rw-r--r--source/blender/editors/space_text/text_ops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index df90ce24dda..5af44f93d06 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -2409,8 +2409,8 @@ static int text_scroll_bar_invoke(bContext *C, wmOperator *op, wmEvent *event)
/* jump scroll, works in v2d but needs to be added here too :S */
if (event->type == MIDDLEMOUSE) {
- tsc->old[0] = ar->winrct.xmin + (st->txtbar.xmax + st->txtbar.xmin) / 2;
- tsc->old[1] = ar->winrct.ymin + (st->txtbar.ymax + st->txtbar.ymin) / 2;
+ tsc->old[0] = ar->winrct.xmin + BLI_RCT_CENTER_X(&st->txtbar);
+ tsc->old[1] = ar->winrct.ymin + BLI_RCT_CENTER_Y(&st->txtbar);
tsc->delta[0] = 0;
tsc->delta[1] = 0;