From 3eab8156d369f40de9d8c23672b1de28491ea920 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 11 Jul 2018 12:30:48 +0200 Subject: UI: don't change scrollbar size on mouse move, only fade. It's not necessary to do both, and trying to hit a target that changes size is annoying. --- source/blender/editors/interface/view2d.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'source/blender/editors/interface') diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index bf768f26a93..1b449877abe 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -153,11 +153,10 @@ static void view2d_masks(View2D *v2d, bool check_scrollers) * - if they overlap, they must not occupy the corners (which are reserved for other widgets) */ if (scroll) { - int scroll_width = (v2d->scroll & V2D_SCROLL_SCALE_VERTICAL) ? V2D_SCROLL_WIDTH_TEXT : v2d->size_vert; - int scroll_height = (v2d->scroll & V2D_SCROLL_SCALE_HORIZONTAL) ? V2D_SCROLL_HEIGHT_TEXT : v2d->size_hor; - - CLAMP_MIN(scroll_width, V2D_SCROLL_WIDTH_MIN); - CLAMP_MIN(scroll_height, V2D_SCROLL_HEIGHT_MIN); + const int scroll_width = (v2d->scroll & V2D_SCROLL_SCALE_VERTICAL) ? + V2D_SCROLL_WIDTH_TEXT : V2D_SCROLL_WIDTH; + const int scroll_height = (v2d->scroll & V2D_SCROLL_SCALE_HORIZONTAL) ? + V2D_SCROLL_HEIGHT_TEXT : V2D_SCROLL_HEIGHT; /* vertical scroller */ if (scroll & V2D_SCROLL_LEFT) { -- cgit v1.2.3