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:
authorTon Roosendaal <ton@blender.org>2009-02-10 18:38:00 +0300
committerTon Roosendaal <ton@blender.org>2009-02-10 18:38:00 +0300
commit25440893dde5ac0f635649d2fbc99fa67f997b75 (patch)
treed27eadcb6b552e20f8012f786023b548501fbc18 /source/blender/editors/interface/view2d.c
parentf7a65886326a8cc17d7f7cf5b6e3988699d95329 (diff)
2.5
*** Proof of concept! **** 3D window Panels back, in own designated region for now. Activate or hide it with Nkey. Note that Background Image doesn't work yet, Transform Orientations probably need tests by Martin, Sculpt options have to be recoded there by Nicholas. The UI design sessions will of course review all of this! We'll have to solve a lot of related topics; - navigation (where) and context (what) - non-overlapping layouts vs floating panels/bars - properties vs tools (toolbars) - drop panels and make nice (semi-automated) list views? I've also done experiments with making the main 3d view stay 'behind' the buttons region. That makes popping buttons in and out less distracting, but also makes it obscuring the view... it's not in this commit, it didn't work proper :) To get that work it has to be handled by the internal compositor, then it even can have fancy transparency in back. Anyhoo, time enough to play with this a while. Especially for Image window (paint) it can work well too.
Diffstat (limited to 'source/blender/editors/interface/view2d.c')
-rw-r--r--source/blender/editors/interface/view2d.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index 9e91abf14c5..85766adeef4 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -231,7 +231,28 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
}
break;
- /* other view types are completely defined using their own settings already */
+ /* ui listviews, tries to wrap 'tot' inside region width */
+ case V2D_COMMONVIEW_LIST_UI:
+ {
+ /* 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;
+ v2d->maxzoom= 2.0f;
+
+ v2d->align= (V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_POS_Y);
+ v2d->keeptot= V2D_KEEPTOT_BOUNDS;
+
+ v2d->tot.xmin= 0.0f;
+ v2d->tot.xmax= 336.f; // XXX 320 width + 2 x PNL_DIST
+
+ v2d->tot.ymax= 0.0f;
+ v2d->tot.ymin= -336.0f*((float)winy)/(float)winx;
+
+ v2d->cur= v2d->tot;
+
+ }
+ break;
+ /* other view types are completely defined using their own settings already */
default:
/* we don't do anything here, as settings should be fine, but just make sure that rect */
break;