Commit: 5424b4821d28c4ea42b4f195869de1e1620e6889 Author: Yevgeny Makarov Date: Tue Jan 5 14:21:54 2021 -0600 Branches: master https://developer.blender.org/rB5424b4821d28c4ea42b4f195869de1e1620e6889
Fix T83094: Alternate rows in the Sequencer are green (macOS) The issue is that `UI_GetThemeColorBlendShade4fv()` creates a color with alpha, but there is not any background underneath to blend in with. The solution is just to draw an opaque background first, which also halves the number of rects to draw. Note that the brighter rows get very slightly darker after this change. Differential Revision: https://developer.blender.org/D9947 =================================================================== M source/blender/editors/space_sequencer/sequencer_draw.c =================================================================== diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index d6e1a0c833b..f792f75bf96 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -1880,6 +1880,10 @@ static void draw_seq_backdrop(View2D *v2d) uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); + /* View backdrop. */ + immUniformThemeColorShade(TH_BACK, -25); + immRectf(pos, v2d->cur.xmin, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax); + /* Darker overlay over the view backdrop. */ immUniformThemeColorShade(TH_BACK, -20); immRectf(pos, v2d->cur.xmin, -1.0, v2d->cur.xmax, 1.0); @@ -1887,22 +1891,18 @@ static void draw_seq_backdrop(View2D *v2d) /* Alternating horizontal stripes. */ i = max_ii(1, ((int)v2d->cur.ymin) - 1); - float col_alternating[4]; - UI_GetThemeColor4fv(TH_ROW_ALTERNATE, col_alternating); + GPU_blend(GPU_BLEND_ALPHA); + immUniformThemeColor(TH_ROW_ALTERNATE); while (i < v2d->cur.ymax) { if (i & 1) { - immUniformThemeColorBlendShade(TH_BACK, TH_ROW_ALTERNATE, col_alternating[3], -25); - } - else { - immUniformThemeColorShade(TH_BACK, -25); + immRectf(pos, v2d->cur.xmin, i, v2d->cur.xmax, i + 1); } - - immRectf(pos, v2d->cur.xmin, i, v2d->cur.xmax, i + 1); - i++; } + GPU_blend(GPU_BLEND_NONE); + /* Lines separating the horizontal bands. */ i = max_ii(1, ((int)v2d->cur.ymin) - 1); int line_len = (int)v2d->cur.ymax - i + 1; _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs