From 3b9813fe50497e077faeb052a26a436868230e20 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Wed, 8 May 2019 15:09:02 +0200 Subject: UI: Move scrollbars to the right in animation editors The text, that was in the scrollbars, stays on the left. Reviewers: brecht, billreynish Differential Revision: https://developer.blender.org/D4821 --- source/blender/editors/space_clip/space_clip.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/space_clip/space_clip.c') diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c index 6ebecbf3fd5..814c6284669 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -95,7 +95,7 @@ static void init_preview_region(const Scene *scene, ar->v2d.minzoom = 0.01f; ar->v2d.maxzoom = 50; - ar->v2d.scroll = (V2D_SCROLL_BOTTOM | V2D_SCROLL_SCALE_HORIZONTAL); + ar->v2d.scroll = (V2D_SCROLL_BOTTOM | V2D_SCROLL_HORIZONTAL_HANDLES); ar->v2d.scroll |= (V2D_SCROLL_RIGHT); ar->v2d.keepzoom = V2D_LOCKZOOM_Y; ar->v2d.keepofs = V2D_KEEPOFS_Y; @@ -116,8 +116,8 @@ static void init_preview_region(const Scene *scene, ar->v2d.max[0] = MAXFRAMEF; ar->v2d.max[1] = FLT_MAX; - ar->v2d.scroll = (V2D_SCROLL_BOTTOM | V2D_SCROLL_SCALE_HORIZONTAL); - ar->v2d.scroll |= (V2D_SCROLL_LEFT | V2D_SCROLL_SCALE_VERTICAL); + ar->v2d.scroll = (V2D_SCROLL_BOTTOM | V2D_SCROLL_HORIZONTAL_HANDLES); + ar->v2d.scroll |= (V2D_SCROLL_RIGHT | V2D_SCROLL_VERTICAL_HANDLES); ar->v2d.minzoom = 0.0f; ar->v2d.maxzoom = 0.0f; @@ -1055,7 +1055,15 @@ static void graph_region_draw(const bContext *C, ARegion *ar) UI_view2d_scrollers_free(scrollers); /* scale indicators */ - UI_view2d_draw_scale_y__values(ar, v2d, &v2d->vert, TH_TEXT); + { + rcti rect; + BLI_rcti_init(&rect, + 0, + 15 * UI_DPI_FAC, + 15 * UI_DPI_FAC, + UI_DPI_FAC * ar->sizey - UI_SCRUBBING_MARGIN_Y); + UI_view2d_draw_scale_y__values(ar, v2d, &rect, TH_TEXT); + } } static void dopesheet_region_draw(const bContext *C, ARegion *ar) -- cgit v1.2.3