Fix [#20447] Minor infobar bugs

Limited headers to normal header height until multi-line headers are properly implemented.
This commit is contained in:
Matt Ebb 2010-01-29 01:57:15 +00:00
parent b645e56ad5
commit 30c317de70
2 changed files with 15 additions and 3 deletions

@ -1374,6 +1374,7 @@ static int region_scale_invoke(bContext *C, wmOperator *op, wmEvent *event)
if(az->ar) {
RegionMoveData *rmd= MEM_callocN(sizeof(RegionMoveData), "RegionMoveData");
int maxsize;
op->customdata= rmd;
@ -1397,7 +1398,14 @@ static int region_scale_invoke(bContext *C, wmOperator *op, wmEvent *event)
} else {
rmd->origval= rmd->ar->sizey;
}
CLAMP(rmd->maxsize, 0, 1000);
/* limit headers to standard height for now */
if (rmd->ar->regiontype == RGN_TYPE_HEADER)
maxsize = rmd->ar->type->prefsizey;
else
maxsize = 1000;
CLAMP(rmd->maxsize, 0, maxsize);
/* add temp handler */
WM_event_add_modal_handler(C, op);

@ -116,12 +116,16 @@ static SpaceLink *info_duplicate(SpaceLink *sl)
/* add handlers, stuff you only do once or on area/region changes */
static void info_main_area_init(wmWindowManager *wm, ARegion *ar)
{
ED_region_panels_init(wm, ar);
}
static void info_main_area_draw(const bContext *C, ARegion *ar)
{
ED_region_panels(C, ar, 1, NULL, -1);
float col[3];
/* clear and setup matrix */
UI_GetThemeColor3fv(TH_BACK, col);
glClearColor(col[0], col[1], col[2], 0.0);
glClear(GL_COLOR_BUFFER_BIT);
}
void info_operatortypes(void)