Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r--source/blender/editors/screen/area.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 8fb96ca0b76..48b54ddcea3 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -269,7 +269,7 @@ static void draw_azone_arrow(float x1, float y1, float x2, float y2, AZEdge edge
GPU_blend(false);
}
-static void region_draw_azone_tab_arrow(AZone *az)
+static void region_draw_azone_tab_arrow(ScrArea *area, ARegion *region, AZone *az)
{
GPU_blend(true);
@@ -289,7 +289,9 @@ static void region_draw_azone_tab_arrow(AZone *az)
break;
}
- float color[4] = {0.05f, 0.05f, 0.05f, 0.4f};
+ /* Workaround for different color spaces between normal areas and the ones using GPUViewports. */
+ float alpha = WM_region_use_viewport(area, region) ? 0.6f : 0.4f;
+ float color[4] = {0.05f, 0.05f, 0.05f, alpha};
UI_draw_roundbox_aa(
true, (float)az->x1, (float)az->y1, (float)az->x2, (float)az->y2, 4.0f, color);
@@ -330,7 +332,7 @@ static void region_draw_azones(ScrArea *area, ARegion *region)
if (az->region) {
/* only display tab or icons when the region is hidden */
if (az->region->flag & (RGN_FLAG_HIDDEN | RGN_FLAG_TOO_SMALL)) {
- region_draw_azone_tab_arrow(az);
+ region_draw_azone_tab_arrow(area, region, az);
}
}
}