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-07-11 00:43:32 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-07-11 00:43:32 +0400
commit395025d67ec9374039703d591d6d44b664f79dcd (patch)
tree73b800363c759d889c1ff11d55e3a5f7b4256fe0 /source/blender/editors/interface/view2d_ops.c
parentad59d04c77a9b096fd4d7454b0d59e9bf30ffca6 (diff)
2.5:
* Default panel zoom level user preference, when creating new button windows or pressing home-key to reset. Patch by Matt D., thanks!
Diffstat (limited to 'source/blender/editors/interface/view2d_ops.c')
-rw-r--r--source/blender/editors/interface/view2d_ops.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index 101d89da618..54ab0d9ef61 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -1273,6 +1273,7 @@ void VIEW2D_OT_scroller_activate(wmOperatorType *ot)
static int reset_exec(bContext *C, wmOperator *op)
{
+ uiStyle *style= U.uistyles.first;
ARegion *ar= CTX_wm_region(C);
View2D *v2d= &ar->v2d;
int winx, winy;
@@ -1283,26 +1284,26 @@ static int reset_exec(bContext *C, wmOperator *op)
v2d->cur.xmax= v2d->cur.xmin + winx;
v2d->cur.ymax= v2d->cur.ymin + winy;
-
+
/* align */
if(v2d->align) {
/* posx and negx flags are mutually exclusive, so watch out */
if ((v2d->align & V2D_ALIGN_NO_POS_X) && !(v2d->align & V2D_ALIGN_NO_NEG_X)) {
v2d->cur.xmax= 0.0f;
- v2d->cur.xmin= v2d->winx;
+ v2d->cur.xmin= v2d->winx*style->panelzoom;
}
else if ((v2d->align & V2D_ALIGN_NO_NEG_X) && !(v2d->align & V2D_ALIGN_NO_POS_X)) {
- v2d->cur.xmax= v2d->cur.xmax - v2d->cur.xmin;
+ v2d->cur.xmax= (v2d->cur.xmax - v2d->cur.xmin)*style->panelzoom;
v2d->cur.xmin= 0.0f;
}
/* - posx and negx flags are mutually exclusive, so watch out */
if ((v2d->align & V2D_ALIGN_NO_POS_Y) && !(v2d->align & V2D_ALIGN_NO_NEG_Y)) {
v2d->cur.ymax= 0.0f;
- v2d->cur.ymin= -v2d->winy;
+ v2d->cur.ymin= -v2d->winy*style->panelzoom;
}
else if ((v2d->align & V2D_ALIGN_NO_NEG_Y) && !(v2d->align & V2D_ALIGN_NO_POS_Y)) {
- v2d->cur.ymax= v2d->cur.ymax - v2d->cur.ymin;
+ v2d->cur.ymax= (v2d->cur.ymax - v2d->cur.ymin)*style->panelzoom;
v2d->cur.ymin= 0.0f;
}
}