diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-09 23:45:27 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-09 23:45:27 +0400 |
commit | d091856486cffc4351d6ded86de3c33afb3155b4 (patch) | |
tree | 6188adcf6f80afcdac4f41cc9733ac5853443e02 /source/blender/editors/screen/area.c | |
parent | a2a04bab8ae70b2f665eb308a62e15d31e88de87 (diff) |
2.5: Buttons Window
* Fix poll() callback changes in recent commit, note that these have
to work with pinned context too.
* Hide header for context panels in py layout.
* Don't jump back when collapsing a panel, allow the view to be
over some empty space until you scroll back.
* Fix follow context icon, order had to be reversed in icon file.
* ID template now has icon as part of browse button instead of
outside the buttons.
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r-- | source/blender/editors/screen/area.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 1a061172ec1..69af4fbb45d 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -1187,7 +1187,10 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex uiEndBlock(C, block); if(vertical) { - y += yco-style->panelouter; + if(pt->flag & PNL_NO_HEADER) + y += yco; + else + y += yco-style->panelouter; } else { x += w; @@ -1216,13 +1219,20 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex if(vertical) { v2d->keepofs |= V2D_LOCKOFS_X; v2d->keepofs &= ~V2D_LOCKOFS_Y; + + // don't jump back when panels close or hide + y= MAX2(-y, -v2d->cur.ymin); } else { v2d->keepofs &= ~V2D_LOCKOFS_X; v2d->keepofs |= V2D_LOCKOFS_Y; + + // don't jump back when panels close or hide + x= MAX2(x, v2d->cur.xmax); + y= -y; } - UI_view2d_totRect_set(v2d, x, -y); + UI_view2d_totRect_set(v2d, x, y); /* set the view */ UI_view2d_view_ortho(C, v2d); |