macros for rectangle center and size
This commit is contained in:
@@ -3067,9 +3067,9 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* check if there's enough space for the toggles if the sliders are drawn too */
|
||||
if (!(draw_sliders) || ((v2d->mask.xmax - v2d->mask.xmin) > ACHANNEL_BUTTON_WIDTH / 2) ) {
|
||||
if (!(draw_sliders) || (BLI_RCT_SIZE_X(&v2d->mask) > ACHANNEL_BUTTON_WIDTH / 2) ) {
|
||||
/* protect... */
|
||||
if (acf->has_setting(ac, ale, ACHANNEL_SETTING_PROTECT))
|
||||
offset += ICON_WIDTH;
|
||||
@@ -3461,7 +3461,7 @@ void ANIM_channel_draw_widgets(bContext *C, bAnimContext *ac, bAnimListElem *ale
|
||||
}
|
||||
|
||||
/* check if there's enough space for the toggles if the sliders are drawn too */
|
||||
if (!(draw_sliders) || ((v2d->mask.xmax - v2d->mask.xmin) > ACHANNEL_BUTTON_WIDTH / 2) ) {
|
||||
if (!(draw_sliders) || (BLI_RCT_SIZE_X(&v2d->mask) > ACHANNEL_BUTTON_WIDTH / 2) ) {
|
||||
/* protect... */
|
||||
if (acf->has_setting(ac, ale, ACHANNEL_SETTING_PROTECT)) {
|
||||
offset += ICON_WIDTH;
|
||||
|
||||
@@ -773,8 +773,7 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt)
|
||||
if (hasNumInput(&mm->num))
|
||||
break;
|
||||
|
||||
dx = v2d->mask.xmax - v2d->mask.xmin;
|
||||
dx = (v2d->cur.xmax - v2d->cur.xmin) / dx;
|
||||
dx = BLI_RCT_SIZE_X(&v2d->cur) / BLI_RCT_SIZE_X(&v2d->mask);
|
||||
|
||||
if (evt->x != mm->evtx) { /* XXX maybe init for first time */
|
||||
int a, offs, totmark = 0;
|
||||
|
||||
Reference in New Issue
Block a user