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-10-21 09:46:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-21 09:46:41 +0400
commitf3ece5a108db0bdbefb4663ef4ebd9a7e039e263 (patch)
treecb6329453be169ef1ec49ef8b8d50a6b14364880 /source/blender/editors/space_text
parenta1a0c8da13a7b91b0264c7535752864379f3d852 (diff)
style cleanup: trailing tabs & expand some non prefix tabs into spaces.
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r--source/blender/editors/space_text/text_draw.c22
-rw-r--r--source/blender/editors/space_text/text_ops.c8
2 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index a68524fcdd6..2296b27916e 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -1139,7 +1139,7 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll, rcti *back)
barheight = (ltexth > 0) ? (st->viewlines * pix_available) / ltexth : 0;
pix_bardiff = 0;
if (barheight < 20) {
- pix_bardiff = 20 - barheight; /* take into account the now non-linear sizing of the bar */
+ pix_bardiff = 20 - barheight; /* take into account the now non-linear sizing of the bar */
barheight = 20;
}
barstart = (ltexth > 0) ? ((pix_available - pix_bardiff) * st->top) / ltexth : 0;
@@ -1166,9 +1166,9 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll, rcti *back)
/* the scrollbar is non-linear sized */
if (pix_bardiff > 0) {
/* the start of the highlight is in the current viewport */
- if (ltexth && st->viewlines && lhlstart >= st->top && lhlstart <= st->top + st->viewlines) {
+ if (ltexth && st->viewlines && lhlstart >= st->top && lhlstart <= st->top + st->viewlines) {
/* speed the progresion of the start of the highlight through the scrollbar */
- hlstart = ( ( (pix_available - pix_bardiff) * lhlstart) / ltexth) + (pix_bardiff * (lhlstart - st->top) / st->viewlines);
+ hlstart = ( ( (pix_available - pix_bardiff) * lhlstart) / ltexth) + (pix_bardiff * (lhlstart - st->top) / st->viewlines);
}
else if (lhlstart > st->top + st->viewlines && hlstart < barstart + barheight && hlstart > barstart) {
/* push hl start down */
@@ -1179,35 +1179,35 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll, rcti *back)
hlstart = barstart;
}
- if (hlend <= hlstart) {
+ if (hlend <= hlstart) {
hlend = hlstart + 2;
}
/* the end of the highlight is in the current viewport */
- if (ltexth && st->viewlines && lhlend >= st->top && lhlend <= st->top + st->viewlines) {
+ if (ltexth && st->viewlines && lhlend >= st->top && lhlend <= st->top + st->viewlines) {
/* speed the progresion of the end of the highlight through the scrollbar */
hlend = (((pix_available - pix_bardiff) * lhlend) / ltexth) + (pix_bardiff * (lhlend - st->top) / st->viewlines);
}
else if (lhlend < st->top && hlend >= barstart - 2 && hlend < barstart + barheight) {
/* push hl end up */
hlend = barstart;
- }
+ }
else if (lhlend > st->top + st->viewlines && lhlstart < st->top + st->viewlines && hlend < barstart + barheight) {
/* fill out end */
hlend = barstart + barheight;
}
- if (hlend <= hlstart) {
+ if (hlend <= hlstart) {
hlstart = hlend - 2;
- }
- }
+ }
+ }
}
else {
hlstart = 0;
hlend = 0;
}
- if (hlend - hlstart < 2) {
+ if (hlend - hlstart < 2) {
hlend = hlstart + 2;
}
@@ -1702,7 +1702,7 @@ static void draw_brackets(SpaceText *st, ARegion *ar)
if (!endl || endc == -1)
return;
- UI_ThemeColor(TH_HILITE);
+ UI_ThemeColor(TH_HILITE);
x = st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET;
y = ar->winy - st->lheight;
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index b2fb16ff7fe..f9911fdddbf 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -1948,7 +1948,7 @@ static int text_move_cursor(bContext *C, int type, int select)
txt_move_left(text, select);
break;
- case NEXT_CHAR:
+ case NEXT_CHAR:
txt_move_right(text, select);
break;
@@ -2669,7 +2669,7 @@ static void text_cursor_set_apply(bContext *C, wmOperator *op, wmEvent *event)
text_update_cursor_moved(C);
WM_event_add_notifier(C, NC_TEXT | ND_CURSOR, st->text);
- }
+ }
else if (!st->wordwrap && (event->mval[0] < 0 || event->mval[0] > ar->winx)) {
if (event->mval[0] > ar->winx) st->left++;
else if (event->mval[0] < 0 && st->left > 0) st->left--;
@@ -2679,7 +2679,7 @@ static void text_cursor_set_apply(bContext *C, wmOperator *op, wmEvent *event)
text_update_cursor_moved(C);
WM_event_add_notifier(C, NC_TEXT | ND_CURSOR, st->text);
// XXX PIL_sleep_ms(10);
- }
+ }
else {
text_cursor_set_to_pos(st, ar, event->mval[0], event->mval[1], 1);
@@ -2688,7 +2688,7 @@ static void text_cursor_set_apply(bContext *C, wmOperator *op, wmEvent *event)
ssel->old[0] = event->mval[0];
ssel->old[1] = event->mval[1];
- }
+ }
}
static void text_cursor_set_exit(bContext *C, wmOperator *op)