Fix [#20447] Minor infobar bugs
authorMatt Ebb <matt@mke3.net>
Fri, 29 Jan 2010 01:57:15 +0000 (01:57 +0000)
committerMatt Ebb <matt@mke3.net>
Fri, 29 Jan 2010 01:57:15 +0000 (01:57 +0000)
Limited headers to normal header height until multi-line headers are properly implemented.

source/blender/editors/screen/screen_ops.c
source/blender/editors/space_info/space_info.c

index 7f6f1c3..5c66c9a 100644 (file)
@@ -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);
index af6bec0..9f7a744 100644 (file)
@@ -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)