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-06-16 05:08:39 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-06-16 05:08:39 +0400
commitf10541f7cfa13b3f2c92abea2c99c2901efbf91a (patch)
tree29359fc0122925407301ef8d2ecd94cb5477a47f /source/blender/editors/screen/area.c
parent51fbc95e8c8699cd9ba2f7b1958df7270851af39 (diff)
UI
* Added option for panel to be closed by default. * Added support for RNA property and enum icons in buttons. * Remove some deprecated RNA menu code. * Fix issue with newly created panels not being inserted in the right place. * Fix issue with 3-split layout not being divided correctly. * FIx issue with menu items not drawing correct using python UI.
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r--source/blender/editors/screen/area.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 81b63b694ba..c2521bd5b2c 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1106,6 +1106,7 @@ int ED_area_header_standardbuttons(const bContext *C, uiBlock *block, int yco)
void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *context)
{
+ ScrArea *sa= CTX_wm_area(C);
uiStyle *style= U.uistyles.first;
uiBlock *block;
PanelType *pt;
@@ -1143,7 +1144,7 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex
/* draw panel */
if(pt->draw && (!pt->poll || pt->poll(C, pt))) {
block= uiBeginBlock(C, ar, pt->idname, UI_EMBOSS);
- panel= uiBeginPanel(ar, block, pt, &open);
+ panel= uiBeginPanel(sa, ar, block, pt, &open);
if(vertical)
y -= header;
@@ -1161,7 +1162,6 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex
}
if(open) {
- panel->type= pt;
panel->layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL,
style->panelspace, 0, w-2*style->panelspace, em, style);
@@ -1173,8 +1173,10 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex
yco -= 2*style->panelspace;
uiEndPanel(block, w, -yco);
}
- else
+ else {
yco= 0;
+ uiEndPanel(block, w, 0);
+ }
uiEndBlock(C, block);