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-11-21 15:06:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-11-21 15:15:02 +0300
commit7c18fcbe03271f15ed4f6f4af14c60e84f8bb9cc (patch)
treec7653aa120e435ca13b053e1e097f577db1b44cf /source/blender/editors/space_text/text_draw.c
parent355905cb0278c368059fdecef8735b731d97b97c (diff)
Cleanup: clang-format
Also remove unused vars.
Diffstat (limited to 'source/blender/editors/space_text/text_draw.c')
-rw-r--r--source/blender/editors/space_text/text_draw.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index b2366cbe182..278d5dad808 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -1314,7 +1314,7 @@ static void draw_text_decoration(SpaceText *st, ARegion *ar)
}
if (st->line_hlight) {
- int x1, x2, y1, y2;
+ int y1, y2;
if (st->wordwrap) {
int visible_lines = text_get_visible_lines(st, ar, text->sell->line);
@@ -1337,8 +1337,7 @@ static void draw_text_decoration(SpaceText *st, ARegion *ar)
GPU_blend_set_func_separate(
GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
GPU_blend(true);
- immRecti(
- pos, 0, y1, ar->winx, y2);
+ immRecti(pos, 0, y1, ar->winx, y2);
GPU_blend(false);
}
}
@@ -1360,11 +1359,8 @@ static void draw_text_decoration(SpaceText *st, ARegion *ar)
w *= st->tabnumber - (vselc + st->left) % st->tabnumber;
}
- immRecti(pos,
- x,
- y - lheight - U.pixelsize,
- x + w + U.pixelsize,
- y - lheight - (3 * U.pixelsize));
+ immRecti(
+ pos, x, y - lheight - U.pixelsize, x + w + U.pixelsize, y - lheight - (3 * U.pixelsize));
}
else {
immRecti(pos, x - U.pixelsize, y, x + U.pixelsize, y - lheight);
@@ -1512,8 +1508,7 @@ static void draw_brackets(const SpaceText *st, const TextDrawContext *tdc, ARegi
viewl = txt_get_span(text->lines.first, startl) - st->top + offl;
text_font_draw_character(tdc, x + viewc * st->cwidth, y - viewl * TXT_LINE_HEIGHT(st), ch);
- text_font_draw_character(
- tdc, x + viewc * st->cwidth + 1, y - viewl * TXT_LINE_HEIGHT(st), ch);
+ text_font_draw_character(tdc, x + viewc * st->cwidth + 1, y - viewl * TXT_LINE_HEIGHT(st), ch);
}
/* draw closing bracket */
@@ -1525,8 +1520,7 @@ static void draw_brackets(const SpaceText *st, const TextDrawContext *tdc, ARegi
viewl = txt_get_span(text->lines.first, endl) - st->top + offl;
text_font_draw_character(tdc, x + viewc * st->cwidth, y - viewl * TXT_LINE_HEIGHT(st), ch);
- text_font_draw_character(
- tdc, x + viewc * st->cwidth + 1, y - viewl * TXT_LINE_HEIGHT(st), ch);
+ text_font_draw_character(tdc, x + viewc * st->cwidth + 1, y - viewl * TXT_LINE_HEIGHT(st), ch);
}
}