diff options
author | Ton Roosendaal <ton@blender.org> | 2009-02-19 20:13:04 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-02-19 20:13:04 +0300 |
commit | dd78ca15c74ad16905c5ac4d4460aab502e1031e (patch) | |
tree | 22948b74f8f27d37ba238b9584277ed331e1a995 /source/blender/editors/interface/view2d.c | |
parent | 6bf9f383dc3d0dc271dd3ffa3e22becea5675530 (diff) |
2.5
Made sliders behave correct in SpaceGraph and SpaceAction.
- no slider draw when all is visible
- sliders update correct when visibility changes.
Still an issue here to tackle; view2d->tot is used incorrect...
it's set on window size now (??), it should be the boundbox of
the entire contents. That allows correct slider draws and ops
like 'view home'.
Will poke Joshua tomorrow. :)
Diffstat (limited to 'source/blender/editors/interface/view2d.c')
-rw-r--r-- | source/blender/editors/interface/view2d.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index 85766adeef4..15b345e5992 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -731,10 +731,18 @@ void UI_view2d_curRect_reset (View2D *v2d) /* Change the size of the maximum viewable area (i.e. 'tot' rect) */ void UI_view2d_totRect_set (View2D *v2d, int width, int height) { + int scroll= view2d_scroll_mapped(v2d->scroll); + /* don't do anything if either value is 0 */ width= abs(width); height= abs(height); + /* hrumf! */ + if(scroll & V2D_SCROLL_HORIZONTAL) + width -= V2D_SCROLL_WIDTH; + if(scroll & V2D_SCROLL_VERTICAL) + height -= V2D_SCROLL_HEIGHT; + if (ELEM3(0, v2d, width, height)) { printf("Error: View2D totRect set exiting: v2d=%p width=%d height=%d \n", v2d, width, height); // XXX temp debug info return; |