diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-22 00:34:05 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-22 00:34:05 +0400 |
commit | c92ab5c3ef2d8339650eb95cd2ebba8c6956b62d (patch) | |
tree | 960acc2f94886377a44a7adc03d6afc9239ec640 /source/blender/editors/space_text/text_draw.c | |
parent | abd031bb4eb2d2e8a1820da5a3338aa79266f6ef (diff) |
code cleanup: use rect size macros
Diffstat (limited to 'source/blender/editors/space_text/text_draw.c')
-rw-r--r-- | source/blender/editors/space_text/text_draw.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 6240d174575..97eb5b41db7 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -39,6 +39,7 @@ #include "BLF_api.h" #include "BLI_blenlib.h" +#include "BLI_math.h" #include "BLI_utildefines.h" #include "DNA_text_types.h" @@ -1231,7 +1232,7 @@ static void draw_textscroll(SpaceText *st, rcti *scroll, rcti *back) uiWidgetScrollDraw(&wcol, scroll, &st->txtbar, (st->flags & ST_SCROLL_SELECT) ? UI_SCROLL_PRESSED : 0); uiSetRoundBox(UI_CNR_ALL); - rad = 0.4f * MIN2(st->txtscroll.xmax - st->txtscroll.xmin, st->txtscroll.ymax - st->txtscroll.ymin); + rad = 0.4f * mini(BLI_RCT_SIZE_X(&st->txtscroll), BLI_RCT_SIZE_Y(&st->txtscroll)); UI_GetThemeColor3ubv(TH_HILITE, col); col[3] = 48; glColor4ubv(col); |