diff options
author | Joshua Leung <aligorith@gmail.com> | 2008-12-14 11:32:21 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2008-12-14 11:32:21 +0300 |
commit | ffc0089b7b8a9d067ce96c0d0ccde8f85fefb736 (patch) | |
tree | b6612da25ac1b21f3cb992c1988ce80b3f7ed10d /source/blender/makesdna/DNA_view2d_types.h | |
parent | 213f30078c3c972a9bc42b96ce35ecbaaa9429ca (diff) |
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...
Diffstat (limited to 'source/blender/makesdna/DNA_view2d_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_view2d_types.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_view2d_types.h b/source/blender/makesdna/DNA_view2d_types.h index e60fe90fbb9..986996e4341 100644 --- a/source/blender/makesdna/DNA_view2d_types.h +++ b/source/blender/makesdna/DNA_view2d_types.h @@ -46,12 +46,12 @@ typedef struct View2D { short scroll; /* scroll - scrollbars to display (bitflag) */ short keeptot; /* keeptot - 'cur' rect cannot move outside the 'tot' rect? */ - short keepaspect; /* keepaspect - need to maintain aspect ratio (0 or 1 boolean only) */ short keepzoom; /* keepzoom - axes that zooming cannot occur on, and also clamp within zoom-limits */ short keepofs; /* keepofs - axes that translation is not allowed to occur on */ short flag; /* settings */ short align; /* alignment of content in totrect */ + short type; /* basic 'type' of View2D (for easy init) */ // err... do we want to store this? short winx, winy; /* storage of current winx/winy values, set in UI_view2d_size_update */ short oldwinx, oldwiny; /* storage of previous winx/winy values encountered by UI_view2d_curRect_validate(), for keepaspect */ @@ -64,6 +64,7 @@ typedef struct View2D { /* view zooming restrictions, per axis (v2d->keepzoom) */ #define V2D_KEEPZOOM 0x0001 +#define V2D_KEEPASPECT 0x0002 #define V2D_LOCKZOOM_X 0x0100 #define V2D_LOCKZOOM_Y 0x0200 |