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:
authorHarley Acheson <harley>2019-01-04 17:11:59 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-01-04 17:26:11 +0300
commit86061520ec1180b4c0c59603aa36f0c7bf8933fc (patch)
tree5b14aa4622eab7bcf9e819a22542f38f10cf9c5d /source/blender/editors/space_text/text_draw.c
parent07c61e0ad8a00eed30480c3dee121ea977deab10 (diff)
UI: make text editor scrollbar with consistent with other editors.
Differential Revision: https://developer.blender.org/D4144
Diffstat (limited to 'source/blender/editors/space_text/text_draw.c')
-rw-r--r--source/blender/editors/space_text/text_draw.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index aa499d52589..765bfbd9b83 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -798,22 +798,22 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll, rcti *back)
short barheight, barstart, hlstart, hlend, blank_lines;
short pix_available, pix_top_margin, pix_bottom_margin, pix_bardiff;
- pix_top_margin = 8;
- pix_bottom_margin = 4;
+ pix_top_margin = (0.4 * U.widget_unit);
+ pix_bottom_margin = (0.4 * U.widget_unit);
pix_available = ar->winy - pix_top_margin - pix_bottom_margin;
ltexth = text_get_total_lines(st, ar);
blank_lines = st->viewlines / 2;
/* nicer code: use scroll rect for entire bar */
- back->xmin = ar->winx - (V2D_SCROLL_WIDTH + 1);
+ back->xmin = ar->winx - (0.6 * U.widget_unit);
back->xmax = ar->winx;
back->ymin = 0;
back->ymax = ar->winy;
- scroll->xmin = ar->winx - V2D_SCROLL_WIDTH;
- scroll->xmax = ar->winx - 5;
- scroll->ymin = 4;
- scroll->ymax = 4 + pix_available;
+ scroll->xmax = ar->winx - (0.2 * U.widget_unit);
+ scroll->xmin = scroll->xmax - (0.4 * U.widget_unit);
+ scroll->ymin = pix_top_margin;
+ scroll->ymax = pix_available;
/* when re-sizing a view-port with the bar at the bottom to a greater height more blank lines will be added */
if (ltexth + blank_lines < st->top + st->viewlines) {