diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2018-05-07 02:31:18 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2018-05-07 12:42:12 +0300 |
commit | 51efeb683451d896531baac949de65043edff0b6 (patch) | |
tree | a36b7c037205b77a78a0b0266a7e9ca4571a0a5a /source/blender/makesdna/DNA_view2d_types.h | |
parent | 4ec467d3b52744ba2aa4f938973efa27202b23ee (diff) |
UI: Hide & shrink scroll-bars based on cursor position
Scroll-bars are now hidden unless the cursor approaches them, in which case they
smoothly grow and become more & more visible. Note that since 0d309144020168e55,
scroll-bars are drawn on top of editor contents. There's no more jumping of
buttons when scroll-bars appear.
Technical notes:
* AZones are used to adjust scrollbars based on mouse movements
We may want to support screen level AZones if we want scrollbars to also
smoothly appear when approaching them from a different area.
I also plan to make further changes to AZones to clean up stuff a bit.
* Had to move AZone handling to a post ARegion init stage, since we need the
updated View2D data from there.
* View2D masks and scroller rectangles are now updated on every redraw. It's
cheap to do that though.
Diffstat (limited to 'source/blender/makesdna/DNA_view2d_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_view2d_types.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_view2d_types.h b/source/blender/makesdna/DNA_view2d_types.h index 3319fed8cdd..a0480aa361b 100644 --- a/source/blender/makesdna/DNA_view2d_types.h +++ b/source/blender/makesdna/DNA_view2d_types.h @@ -64,6 +64,11 @@ typedef struct View2D { int tab_num; /* number of tabs stored */ int tab_cur; /* current tab */ + /* Usually set externally (as in, not in view2d files). */ + char alpha_vert, alpha_hor; /* alpha of vertical and horizontal scrollbars (range is [0, 255]) */ + short size_vert, size_hor; /* Dynamic size for scrollers without scale markers (no V2D_SCROLL_SCALE_FOO) */ + short pad; + /* animated smooth view */ struct SmoothView2DStore *sms; struct wmTimer *smooth_timer; |