Normalize color storage

Colors are now normalized to 0 - 1 values instead of 0 - 255

causes calculations to be simpler and generally cleans up the codebase.
This commit is contained in:
vaxerski 2023-01-05 19:25:45 +01:00
parent 0e3547e0f6
commit 96198dae55
18 changed files with 71 additions and 72 deletions

View file

@ -92,7 +92,6 @@ void CHyprGroupBarDecoration::draw(CMonitor* pMonitor, float a, const Vector2D&
CColor color = m_dwGroupMembers[i] == g_pCompositor->m_pLastWindow ? ((CGradientValueData*)PGROUPCOLACTIVE->get())->m_vColors[0] :
((CGradientValueData*)PGROUPCOLINACTIVE->get())->m_vColors[0];
color.a *= a;
color = color * 255.f; // gradient has 0 - 1
g_pHyprOpenGL->renderRect(&rect, color);
xoff += PAD + BARW;