From d79a23e6b9f01b17a5bed835416a70993e12dadd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 13 Oct 2025 11:46:12 +0200 Subject: [PATCH] Fix #147259: new Timeline / Dope Sheet always shows summary backdrop color Only draw the Summary backdrop color when the Summary channel has been expanded. This prevents the default used-to-be-timeline Dope Sheet from showing a big red bar at the bottom of the window. The channel box backdrop (when the channel bar is expanded) also follows this, so when expanded it is red as before, and when collapsed it is dark grey. Pull Request: https://projects.blender.org/blender/blender/pulls/147708 --- .../blender/editors/animation/anim_channels_defines.cc | 9 ++++++--- source/blender/editors/space_action/action_draw.cc | 7 ++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/source/blender/editors/animation/anim_channels_defines.cc b/source/blender/editors/animation/anim_channels_defines.cc index 4f2dada8090..ae2f70b4eef 100644 --- a/source/blender/editors/animation/anim_channels_defines.cc +++ b/source/blender/editors/animation/anim_channels_defines.cc @@ -419,10 +419,13 @@ static bool acf_generic_dataexpand_setting_valid(bAnimContext *ac, /* Animation Summary ----------------------------------- */ /* get backdrop color for summary widget */ -static void acf_summary_color(bAnimContext * /*ac*/, bAnimListElem * /*ale*/, float r_color[3]) +static void acf_summary_color(bAnimContext *ac, bAnimListElem *ale, float r_color[3]) { - /* reddish color - same as the 'action' line in NLA */ - UI_GetThemeColor3fv(TH_ANIM_ACTIVE, r_color); + /* Only draw the summary line backdrop when it is expanded. If the entire dope sheet is + * just one line, there is no need for any distinction between lines, and the red-ish + * color is only going to be a distraction. */ + const bool is_expanded = ANIM_channel_setting_get(ac, ale, ACHANNEL_SETTING_EXPAND); + UI_GetThemeColor3fv(is_expanded ? TH_ANIM_ACTIVE : TH_HEADER, r_color); } /* backdrop for summary widget */ diff --git a/source/blender/editors/space_action/action_draw.cc b/source/blender/editors/space_action/action_draw.cc index 14fbaac7d8b..07d18bc7e8a 100644 --- a/source/blender/editors/space_action/action_draw.cc +++ b/source/blender/editors/space_action/action_draw.cc @@ -216,7 +216,12 @@ static void draw_backdrops(bAnimContext *ac, ListBase &anim_data, View2D *v2d, u if (ELEM(ac->datatype, ANIMCONT_ACTION, ANIMCONT_DOPESHEET, ANIMCONT_SHAPEKEY)) { switch (ale->type) { case ANIMTYPE_SUMMARY: { - /* reddish color from NLA */ + if (!ANIM_channel_setting_get(ac, ale, ACHANNEL_SETTING_EXPAND)) { + /* Only draw the summary line backdrop when it is expanded. If the entire dope sheet is + * just one line, there is no need for any distinction between lines, and the red-ish + * color is only going to be a distraction. */ + continue; + } immUniformThemeColor(TH_ANIM_ACTIVE); break; }