diff options
author | Matt Ebb <matt@mke3.net> | 2010-01-14 07:16:45 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-01-14 07:16:45 +0300 |
commit | e93d6655bd20fe93c42a3818e2a2f4e01d265835 (patch) | |
tree | 1efd8f16922c060d40db3fa85083da2e6916353a /source | |
parent | 0801544a7a7df6f63259e3bd8ae6851e2d82a0eb (diff) |
Fix [#19932] When reducing panels vertically the scrollbar should not continue redraw in
opposite direction
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/view2d.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index 6cc344b891e..cba314b0bf3 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -1367,6 +1367,9 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, short vert.ymin+=4; vert.ymax-=4; + CLAMP(vert.ymin, vert.ymin, vert.ymax-V2D_SCROLLER_HANDLE_SIZE); + CLAMP(hor.xmin, hor.xmin, hor.xmax-V2D_SCROLLER_HANDLE_SIZE); + /* store in scrollers, used for drawing */ scrollers->vert= vert; scrollers->hor= hor; @@ -1597,8 +1600,7 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v state= (v2d->scroll_ui & V2D_SCROLL_H_ACTIVE)?UI_SCROLL_PRESSED:0; - // TODO: disable this for button regions... - if (!(v2d->keepzoom & V2D_LOCKZOOM_X)) + if (!(v2d->keepzoom & V2D_LOCKZOOM_X) && (slider.xmax - slider.xmin > V2D_SCROLLER_HANDLE_SIZE)) state |= UI_SCROLL_ARROWS; uiWidgetScrollDraw(&wcol, &hor, &slider, state); @@ -1695,8 +1697,7 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v state= (v2d->scroll_ui & V2D_SCROLL_V_ACTIVE)?UI_SCROLL_PRESSED:0; - // TODO: disable this for button regions... - if (!(v2d->keepzoom & V2D_LOCKZOOM_Y)) + if (!(v2d->keepzoom & V2D_LOCKZOOM_Y) && (slider.ymax - slider.ymin > V2D_SCROLLER_HANDLE_SIZE)) state |= UI_SCROLL_ARROWS; uiWidgetScrollDraw(&wcol, &vert, &slider, state); |