From ffc0089b7b8a9d067ce96c0d0ccde8f85fefb736 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sun, 14 Dec 2008 08:32:21 +0000 Subject: View2D: Cosmetic changes and bugfixes * Scrollers now draw using nice rounded+shaded style everywhere * When scrollers 'bubble' completely fills a scroller or is completely out of view, the view zooming using the handles is now only activated if the mouse is within a quarter of the total length of the scroller on either end of the scroller. Otherwise, pan is activated. This should make the scrollers more usable in anim editors. * Fixed drawing of gridlines in TimeLine - needed to adjust ymin value of cur and tot rects to accomodate for the new mask/cur adjustments as old TimeLines didn't draw with 'real' scrollbars. Also, adjusted min/max values to fit these new tot/cur rect y-sizes. * Tidying up vars and fixing errors in declaring new View2D types in preparation for simpler method of initialising views... --- source/blender/editors/space_time/space_time.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/space_time') diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c index 728beae364e..9ed69979dba 100644 --- a/source/blender/editors/space_time/space_time.c +++ b/source/blender/editors/space_time/space_time.c @@ -223,17 +223,17 @@ static SpaceLink *time_new(void) ar->regiontype= RGN_TYPE_WINDOW; ar->v2d.tot.xmin= -4.0; - ar->v2d.tot.ymin= 0.0; + ar->v2d.tot.ymin= -10.0; ar->v2d.tot.xmax= (float)EFRA + 4.0; ar->v2d.tot.ymax= 10; ar->v2d.cur= ar->v2d.tot; ar->v2d.min[0]= 1.0; - ar->v2d.min[1]= 500.0; /* XXX */ + ar->v2d.min[1]= 20.0; /* XXX */ ar->v2d.max[0]= 32000.0; - ar->v2d.max[1]= 500; /* XXX */ + ar->v2d.max[1]= 20; /* XXX */ ar->v2d.minzoom= 0.1f; ar->v2d.maxzoom= 10.0; @@ -241,6 +241,7 @@ static SpaceLink *time_new(void) ar->v2d.scroll |= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_BOTTOM); ar->v2d.align |= V2D_ALIGN_NO_NEG_Y; ar->v2d.keepofs |= V2D_LOCKOFS_Y; + ar->v2d.keepzoom |= V2D_LOCKZOOM_Y; return (SpaceLink*)stime; } -- cgit v1.2.3