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:
authorClément Foucault <foucault.clem@gmail.com>2020-05-14 17:16:04 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-05-14 17:16:29 +0300
commitada03e8673978eb12eb372e7750f7b7467ec1303 (patch)
treede30c327f64d1f1d082ffec74196061e976941ce /source/blender/editors/screen/area.c
parent0909b564a9330a9c1c4c5df3b05bf77ae20e8927 (diff)
UI: Fix Unreported missing background for azone arrow
This was caused by the sRGB viewport changes. The fix is to modify the alpha values manually. The shader was also missing a srgb fix.
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 94937ce9db8..96aad89827f 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);
}
}
}