UI: Changes to NLA Solo Button #107672

Merged
Harley Acheson merged 1 commits from Harley/blender:Solo into main 2023-05-12 18:55:15 +02:00
1 changed files with 11 additions and 9 deletions

View File

@ -4468,6 +4468,10 @@ void ANIM_channel_draw(
/* just skip - drawn as widget now */
offset += ICON_WIDTH;
}
else {
/* A bit of padding when there is no expand widget. */
offset += (short)(0.2f * U.widget_unit);
}
/* step 3) draw icon ............................................... */
if (acf->icon) {
@ -4522,10 +4526,6 @@ void ANIM_channel_draw(
offset += ICON_WIDTH;
}
}
else if ((ac->spacetype == SPACE_NLA) && acf->has_setting(ac, ale, ACHANNEL_SETTING_SOLO)) {
/* just skip - drawn as widget now */
offset += ICON_WIDTH;
}
}
/* step 5) draw name ............................................... */
@ -5252,11 +5252,6 @@ void ANIM_channel_draw_widgets(const bContext *C,
offset += ICON_WIDTH;
}
}
else if ((ac->spacetype == SPACE_NLA) && acf->has_setting(ac, ale, ACHANNEL_SETTING_SOLO)) {
/* 'solo' setting for NLA Tracks */
draw_setting_widget(ac, ale, acf, block, offset, ymid, ACHANNEL_SETTING_SOLO);
offset += ICON_WIDTH;
}
}
/* step 4) draw text - check if renaming widget is in use... */
@ -5338,6 +5333,13 @@ void ANIM_channel_draw_widgets(const bContext *C,
/* check if there's enough space for the toggles if the sliders are drawn too */
if (!(draw_sliders) || (BLI_rcti_size_x(&v2d->mask) > ANIM_UI_get_channel_button_width() / 2))
{
/* solo... */
if ((ac->spacetype == SPACE_NLA) && acf->has_setting(ac, ale, ACHANNEL_SETTING_SOLO)) {
offset -= ICON_WIDTH;
draw_setting_widget(ac, ale, acf, block, offset, ymid, ACHANNEL_SETTING_SOLO);
/* A touch of padding because the star icon is so wide. */
offset -= (short)(0.2f * ICON_WIDTH);
}
/* protect... */
if (acf->has_setting(ac, ale, ACHANNEL_SETTING_PROTECT)) {
offset -= ICON_WIDTH;