diff options
-rw-r--r-- | source/blender/editors/space_text/text_draw.c | 14 |
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) { |