diff --git a/src/renderer/Renderer.cpp b/src/renderer/Renderer.cpp index 78bb03c..11c8247 100644 --- a/src/renderer/Renderer.cpp +++ b/src/renderer/Renderer.cpp @@ -128,7 +128,7 @@ CRenderer::SRenderFeedback CRenderer::renderLock(const CSessionLockSurface& surf glClear(GL_COLOR_BUFFER_BIT); glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); SRenderFeedback feedback; @@ -162,6 +162,8 @@ CRenderer::SRenderFeedback CRenderer::renderLock(const CSessionLockSurface& surf feedback.needsFrame = feedback.needsFrame || !asyncResourceGatherer->ready || bga < 1.0; + glDisable(GL_BLEND); + return feedback; } diff --git a/src/renderer/widgets/PasswordInputField.cpp b/src/renderer/widgets/PasswordInputField.cpp index 30fcafe..93d2870 100644 --- a/src/renderer/widgets/PasswordInputField.cpp +++ b/src/renderer/widgets/PasswordInputField.cpp @@ -103,10 +103,10 @@ bool CPasswordInputField::draw(const SRenderData& data) { float passAlpha = g_pHyprlock->passwordCheckWaiting() ? 0.5 : 1.0; CColor outerCol = outer; - outer.a = fade.a * data.opacity; + outer.a *= fade.a * data.opacity; CColor innerCol = inner; - innerCol.a = fade.a * data.opacity; - CColor fontCol = font; + innerCol.a *= fade.a * data.opacity; + CColor fontCol = font; fontCol.a *= fade.a * data.opacity * passAlpha; g_pRenderer->renderRect(outerBox, outerCol, outerBox.h / 2.0); @@ -144,7 +144,7 @@ bool CPasswordInputField::draw(const SRenderData& data) { Vector2D currentPos = inputFieldBox.pos() + Vector2D{PASS_SPACING * 4, inputFieldBox.h / 2.f - PASS_SIZE / 2.f} + Vector2D{(PASS_SIZE + PASS_SPACING) * std::floor(dots.currentAmount), 0}; CBox box{currentPos, Vector2D{PASS_SIZE, PASS_SIZE}}; - fontCol.a = (dots.currentAmount - std::floor(dots.currentAmount)) * data.opacity; + fontCol.a *= (dots.currentAmount - std::floor(dots.currentAmount)) * data.opacity; g_pRenderer->renderRect(box, fontCol, PASS_SIZE / 2.0); } }