Fix bar dark gradient effect.

This commit is contained in:
Skyth 2024-11-13 23:16:49 +03:00
parent 9b90ad9c0c
commit 90bd3ce3fa

View file

@ -106,9 +106,7 @@ static void DrawScanlineBars()
auto& res = ImGui::GetIO().DisplaySize;
auto drawList = ImGui::GetForegroundDrawList();
SetShaderModifier(IMGUI_SHADER_MODIFIER_SCANLINE);
// Top bar
// Top bar fade
drawList->AddRectFilledMultiColor(
{ 0.0f, 0.0f },
{ res.x, height },
@ -117,6 +115,18 @@ static void DrawScanlineBars()
FADE_COLOR1,
FADE_COLOR1);
// Bottom bar fade
drawList->AddRectFilledMultiColor(
{ res.x, res.y },
{ 0.0f, res.y - height },
FADE_COLOR0,
FADE_COLOR0,
FADE_COLOR1,
FADE_COLOR1);
SetShaderModifier(IMGUI_SHADER_MODIFIER_SCANLINE);
// Top bar
drawList->AddRectFilledMultiColor(
{ 0.0f, 0.0f },
{ res.x, height },
@ -126,14 +136,6 @@ static void DrawScanlineBars()
COLOR1);
// Bottom bar
drawList->AddRectFilledMultiColor(
{ res.x, res.y },
{ 0.0f, res.y - height },
FADE_COLOR0,
FADE_COLOR0,
FADE_COLOR1,
FADE_COLOR1);
drawList->AddRectFilledMultiColor(
{ res.x, res.y },
{ 0.0f, res.y - height },