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-19 20:13:04 +0300
committerTon Roosendaal <ton@blender.org>2009-02-19 20:13:04 +0300
commitdd78ca15c74ad16905c5ac4d4460aab502e1031e (patch)
tree22948b74f8f27d37ba238b9584277ed331e1a995 /source/blender/editors
parent6bf9f383dc3d0dc271dd3ffa3e22becea5675530 (diff)
2.5
Made sliders behave correct in SpaceGraph and SpaceAction. - no slider draw when all is visible - sliders update correct when visibility changes. Still an issue here to tackle; view2d->tot is used incorrect... it's set on window size now (??), it should be the boundbox of the entire contents. That allows correct slider draws and ops like 'view home'. Will poke Joshua tomorrow. :)
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/view2d.c8
-rw-r--r--source/blender/editors/space_action/action_draw.c10
-rw-r--r--source/blender/editors/space_graph/graph_draw.c2
-rw-r--r--source/blender/editors/space_graph/space_graph.c2
4 files changed, 14 insertions, 8 deletions
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index 85766adeef4..15b345e5992 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -731,10 +731,18 @@ void UI_view2d_curRect_reset (View2D *v2d)
/* Change the size of the maximum viewable area (i.e. 'tot' rect) */
void UI_view2d_totRect_set (View2D *v2d, int width, int height)
{
+ int scroll= view2d_scroll_mapped(v2d->scroll);
+
/* don't do anything if either value is 0 */
width= abs(width);
height= abs(height);
+ /* hrumf! */
+ if(scroll & V2D_SCROLL_HORIZONTAL)
+ width -= V2D_SCROLL_WIDTH;
+ if(scroll & V2D_SCROLL_VERTICAL)
+ height -= V2D_SCROLL_HEIGHT;
+
if (ELEM3(0, v2d, width, height)) {
printf("Error: View2D totRect set exiting: v2d=%p width=%d height=%d \n", v2d, width, height); // XXX temp debug info
return;
diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c
index 87fdfe4ffdb..75ff73de56e 100644
--- a/source/blender/editors/space_action/action_draw.c
+++ b/source/blender/editors/space_action/action_draw.c
@@ -1037,12 +1037,10 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
* start of list offset, and the second is as a correction for the scrollers.
*/
height= ((items*ACHANNEL_STEP) + (ACHANNEL_HEIGHT*2));
- if (height > (v2d->mask.ymax - v2d->mask.ymin)) {
- /* don't use totrect set, as the width stays the same
- * (NOTE: this is ok here, the configuration is pretty straightforward)
- */
- v2d->tot.ymin= (float)(-height);
- }
+ /* don't use totrect set, as the width stays the same
+ * (NOTE: this is ok here, the configuration is pretty straightforward)
+ */
+ v2d->tot.ymin= (float)(-height);
/* first backdrop strips */
y= (float)(-ACHANNEL_HEIGHT);
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c
index ec8ef17ab4f..cfd18af78de 100644
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@ -786,7 +786,7 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar)
}
/* XXX I would call the below line! (ton) */
- /* UI_view2d_totRect_set(v2d, ar->type->minsizex, height); */
+ UI_view2d_totRect_set(v2d, ar->winx, height);
/* loop through channels, and set up drawing depending on their type */
y= (float)ACHANNEL_FIRST;
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index 07a287ca4fc..da18e4d9726 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -482,7 +482,7 @@ void ED_spacetype_ipo(void)
/* regions: channels */
art= MEM_callocN(sizeof(ARegionType), "spacetype graphedit region");
art->regionid = RGN_TYPE_CHANNELS;
- art->minsizex= 214; /* 200 is the 'standard', but due to scrollers, we want a bit more to fit the lock icons in */
+ art->minsizex= 200+V2D_SCROLL_WIDTH; /* 200 is the 'standard', but due to scrollers, we want a bit more to fit the lock icons in */
art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES;
art->listener= graph_region_listener;
art->init= graph_channel_area_init;