Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-07-09 23:45:27 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-07-09 23:45:27 +0400
commitd091856486cffc4351d6ded86de3c33afb3155b4 (patch)
tree6188adcf6f80afcdac4f41cc9733ac5853443e02 /source/blender/editors/interface/interface_panel.c
parenta2a04bab8ae70b2f665eb308a62e15d31e88de87 (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/interface/interface_panel.c')
-rw-r--r--source/blender/editors/interface/interface_panel.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index 3e009b50045..a3c456c0a93 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -653,6 +653,14 @@ static int get_panel_header(Panel *pa)
return PNL_HEADER;
}
+static int get_panel_size_y(uiStyle *style, Panel *pa)
+{
+ if(pa->type && (pa->type->flag & PNL_NO_HEADER))
+ return pa->sizey;
+
+ return PNL_HEADER + pa->sizey + style->panelouter;
+}
+
/* this function is needed because uiBlock and Panel itself dont
change sizey or location when closed */
static int get_panel_real_ofsy(Panel *pa)
@@ -771,18 +779,18 @@ int uiAlignPanelStep(ScrArea *sa, ARegion *ar, float fac, int drag)
/* no smart other default start loc! this keeps switching f5/f6/etc compatible */
ps= panelsort;
ps->pa->ofsx= 0;
- ps->pa->ofsy= -ps->pa->sizey-get_panel_header(ps->pa)-style->panelouter;
+ ps->pa->ofsy= -get_panel_size_y(style, ps->pa);
for(a=0; a<tot-1; a++, ps++) {
psnext= ps+1;
if(align==BUT_VERTICAL) {
psnext->pa->ofsx= ps->pa->ofsx;
- psnext->pa->ofsy= get_panel_real_ofsy(ps->pa) - psnext->pa->sizey-get_panel_header(psnext->pa)-style->panelouter;
+ psnext->pa->ofsy= get_panel_real_ofsy(ps->pa) - get_panel_size_y(style, psnext->pa);
}
else {
psnext->pa->ofsx= get_panel_real_ofsx(ps->pa);
- psnext->pa->ofsy= ps->pa->ofsy + ps->pa->sizey + get_panel_header(ps->pa) - psnext->pa->sizey - get_panel_header(psnext->pa);
+ psnext->pa->ofsy= ps->pa->ofsy + get_panel_size_y(style, ps->pa) - get_panel_size_y(style, psnext->pa);
}
}