diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index 2f92901c8f5..0f7532383c9 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -254,6 +254,8 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy) /* panels view, with horizontal/vertical align */ case V2D_COMMONVIEW_PANELS_UI: { + float panelzoom= (style) ? style->panelzoom : 1.0f; + /* for now, aspect ratio should be maintained, and zoom is clamped within sane default limits */ v2d->keepzoom= (V2D_KEEPASPECT|V2D_KEEPZOOM); v2d->minzoom= 0.5f; @@ -271,13 +273,10 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy) v2d->tot.ymin= -winy; v2d->cur.xmin= 0.0f; - v2d->cur.xmax= winx*style->panelzoom; + v2d->cur.xmax= winx*panelzoom; v2d->cur.ymax= 0.0f; - v2d->cur.ymin= -winy*style->panelzoom; - - v2d->cur.ymax= 0.0f; - v2d->cur.ymin= -winy*style->panelzoom; + v2d->cur.ymin= -winy*panelzoom; } break; diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index efd8754a760..e84aab787c1 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -1256,9 +1256,11 @@ void ED_region_panels_init(wmWindowManager *wm, ARegion *ar) ListBase *keymap; // XXX quick hacks for files saved with 2.5 already (i.e. the builtin defaults file) + // scrollbars for button regions ar->v2d.scroll |= (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM); - //if(!(ar->v2d.align & V2D_ALIGN_NO_POS_Y)) - // ar->v2d.flag &= ~V2D_IS_INITIALISED; + // correctly initialised User-Prefs? + if(!(ar->v2d.align & V2D_ALIGN_NO_POS_Y)) + ar->v2d.flag &= ~V2D_IS_INITIALISED; UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_PANELS_UI, ar->winx, ar->winy);