Revision: 40768
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40768
Author:   campbellbarton
Date:     2011-10-03 04:48:14 +0000 (Mon, 03 Oct 2011)
Log Message:
-----------
fix [#27578] Fileselector UI area does not scale with UI (partially hides 
buttons)

Modified Paths:
--------------
    trunk/blender/source/blender/editors/screen/area.c
    trunk/blender/source/blender/editors/space_file/file_draw.c
    trunk/blender/source/blender/editors/space_file/space_file.c

Modified: trunk/blender/source/blender/editors/screen/area.c
===================================================================
--- trunk/blender/source/blender/editors/screen/area.c  2011-10-03 03:48:48 UTC 
(rev 40767)
+++ trunk/blender/source/blender/editors/screen/area.c  2011-10-03 04:48:14 UTC 
(rev 40768)
@@ -831,6 +831,9 @@
        prefsizex= ar->sizex?ar->sizex:ar->type->prefsizex;
        if(ar->regiontype==RGN_TYPE_HEADER)
                prefsizey= ar->type->prefsizey;
+       else if(ar->regiontype==RGN_TYPE_UI && sa->spacetype == SPACE_FILE) {
+               prefsizey= UI_UNIT_Y * 2 + (UI_UNIT_Y/2);
+       }
        else
                prefsizey= ar->sizey?ar->sizey:ar->type->prefsizey;
        

Modified: trunk/blender/source/blender/editors/space_file/file_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_file/file_draw.c 2011-10-03 
03:48:48 UTC (rev 40767)
+++ trunk/blender/source/blender/editors/space_file/file_draw.c 2011-10-03 
04:48:14 UTC (rev 40768)
@@ -111,8 +111,8 @@
 {
        /* Button layout. */
        const int max_x      = ar->winx - 10;
-       const int line1_y    = IMASEL_BUTTONS_HEIGHT/2 + 
IMASEL_BUTTONS_MARGIN*2;
-       const int line2_y    = IMASEL_BUTTONS_MARGIN;
+       const int line1_y    = ar->winy - (IMASEL_BUTTONS_HEIGHT/2 + 
IMASEL_BUTTONS_MARGIN);
+       const int line2_y    = line1_y - (IMASEL_BUTTONS_HEIGHT/2 + 
IMASEL_BUTTONS_MARGIN);
        const int input_minw = 20;
        const int btn_h      = UI_UNIT_Y;
        const int btn_fn_w   = UI_UNIT_X;

Modified: trunk/blender/source/blender/editors/space_file/space_file.c
===================================================================
--- trunk/blender/source/blender/editors/space_file/space_file.c        
2011-10-03 03:48:48 UTC (rev 40767)
+++ trunk/blender/source/blender/editors/space_file/space_file.c        
2011-10-03 04:48:14 UTC (rev 40768)
@@ -520,9 +520,14 @@
        glClearColor(col[0], col[1], col[2], 0.0);
        glClear(GL_COLOR_BUFFER_BIT);
 
+       /* scrolling here is just annoying, disable it */
+       ar->v2d.cur.ymax= ar->v2d.cur.ymax - ar->v2d.cur.ymin;
+       ar->v2d.cur.ymin= 0;
+
        /* set view2d view matrix for scrolling (without scrollers) */
        UI_view2d_view_ortho(&ar->v2d);
 
+
        file_draw_buttons(C, ar);
 
        UI_view2d_view_restore(C);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to