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:
authorJoshua Leung <aligorith@gmail.com>2009-10-21 02:51:20 +0400
committerJoshua Leung <aligorith@gmail.com>2009-10-21 02:51:20 +0400
commitca87f28f5bcb4811757631464a32a80fe91dbb41 (patch)
tree4ae83673d04033d9ca1888a8eff159252de6248f /source/blender/editors/space_text
parent122483518850f0d44d8e12a2f06c66ded878e894 (diff)
Text Editor: Scrollbar now drawn on the right
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r--source/blender/editors/space_text/text_draw.c15
-rw-r--r--source/blender/editors/space_text/text_ops.c2
2 files changed, 5 insertions, 12 deletions
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index 5996770c206..035c56005fe 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -650,8 +650,10 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll)
blank_lines = st->viewlines / 2;
/* nicer code: use scroll rect for entire bar */
- scroll->xmin= 5;
- scroll->xmax= 17;
+ //scroll->xmin= 5;
+ //scroll->xmax= 17;
+ scroll->xmin= ar->winx - 17;
+ scroll->xmax= ar->winx - 5;
scroll->ymin= 4;
scroll->ymax= 4+pix_available;
@@ -752,15 +754,6 @@ static void draw_textscroll(SpaceText *st, ARegion *ar, rcti *scroll)
char col[3];
float rad;
-// UI_ThemeColorShade(TH_SHADE1, -20);
-// glRecti(2, 2, 20, ar->winy-6);
-// uiEmboss(2, 2, 20, ar->winy-6, 1);
-
-// UI_ThemeColor(TH_SHADE1);
-// glRecti(st->txtbar.xmin, st->txtbar.ymin, st->txtbar.xmax, st->txtbar.ymax);
-
-// uiEmboss(st->txtbar.xmin, st->txtbar.ymin, st->txtbar.xmax, st->txtbar.ymax, st->flags & ST_SCROLL_SELECT);
-
uiWidgetScrollDraw(&wcol, scroll, &st->txtbar, (st->flags & ST_SCROLL_SELECT)?UI_SCROLL_PRESSED:0);
uiSetRoundBox(15);
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index a7b40deda22..09c74666b69 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -1901,7 +1901,7 @@ static int scroll_bar_invoke(bContext *C, wmOperator *op, wmEvent *event)
return scroll_exec(C, op);
/* verify we are in the right zone */
- if(!(mval[0]>2 && mval[0]<20 && mval[1]>2 && mval[1]<ar->winy))
+ if(!(mval[0]>ar->winx-20 && mval[0]<ar->winx-2 && mval[1]>2 && mval[1]<ar->winy))
return OPERATOR_PASS_THROUGH;
tsc= MEM_callocN(sizeof(TextScroll), "TextScroll");