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. :)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user