- buttons "Show" and "Key" didn't set the active constraint, causing
  confusement in display for the IpoWindow

Also made the backdrop for constraints and modifiers to use the Panel
theme color, making it better integrated.
This commit is contained in:
Ton Roosendaal 2005-09-28 11:05:20 +00:00
parent c8a4f20fb8
commit b5117eb8fd
3 changed files with 11 additions and 4 deletions

@ -1143,7 +1143,7 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco
uiBlockSetCol(block, color);
/* roundbox 4 free variables: corner-rounding, nop, roundbox type, shade */
uiDefBut(block, ROUNDBOX, 0, "", x-10, y-4, width, 25, NULL, 7.0, 0.0,
(!isVirtual && (md->mode&eModifierMode_Expanded))?3:15, -20, "");
(!isVirtual && (md->mode&eModifierMode_Expanded))?3:15, 20, "");
uiBlockSetCol(block, TH_AUTO);
/* open/close icon */
@ -1248,7 +1248,7 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco
}
/* roundbox 4 free variables: corner-rounding, nop, roundbox type, shade */
uiDefBut(block, ROUNDBOX, 0, "", x-10, y-height-2, width, height-2, NULL, 5.0, 0.0, 12, 0, "");
uiDefBut(block, ROUNDBOX, 0, "", x-10, y-height-2, width, height-2, NULL, 5.0, 0.0, 12, 40, "");
y -= 18;

@ -192,6 +192,8 @@ static void enable_constraint_ipo_func (void *ob_v, void *con_v)
bConstraintChannel *chan;
ListBase *conbase;
constraint_active_func(ob_v, con_v);
conbase = get_active_constraint_channels(ob, 1); // 1 == create
if (!conbase)
@ -228,6 +230,7 @@ static void add_influence_key_to_constraint_func (void *ob_v, void *con_v)
ListBase *conbase;
IpoCurve *icu;
constraint_active_func(ob_v, con_v);
conbase = get_active_constraint_channels(ob, 1); // 1=make
if (!conbase)
@ -430,7 +433,7 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
uiBlockSetEmboss(block, UI_EMBOSSN);
/* rounded header */
rb_col= (con->flag & CONSTRAINT_ACTIVE)?10:-10;
rb_col= (con->flag & CONSTRAINT_ACTIVE)?40:20;
uiDefBut(block, ROUNDBOX, B_DIFF, "", *xco-10, *yco-1, width+40, 22, NULL, 5.0, 0.0,
(con->flag & CONSTRAINT_EXPAND)?3:15 , rb_col-20, "");

@ -1830,11 +1830,15 @@ static void ui_draw_but_CHARTAB(uiBut *but)
static void ui_draw_roundbox(uiBut *but)
{
BIF_ThemeColorShade(but->themecol, but->a2);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
BIF_ThemeColorShadeAlpha(TH_PANEL, but->a2, but->a2);
uiSetRoundBox(but->a1);
gl_round_box(GL_POLYGON, but->x1, but->y1, but->x2, but->y2, but->min);
glDisable(GL_BLEND);
}