Skip to content

Commit

Permalink
input-field: don't change outer color when numlock_color is not set (#…
Browse files Browse the repository at this point in the history
…621)

* input-field: don't change outer color when numlock_color is not set

* input-field: same for bothlock_color
  • Loading branch information
PaideiaDilemma authored Dec 29, 2024
1 parent 753c538 commit 3d63d9b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/renderer/widgets/PasswordInputField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ CPasswordInputField::CPasswordInputField(const Vector2D& viewport_, const std::u
dots.size = std::clamp(dots.size, 0.2f, 0.8f);
dots.spacing = std::clamp(dots.spacing, -1.f, 1.f);
colorConfig.transitionMs = std::clamp(colorConfig.transitionMs, 0, 1000);
colorConfig.both = colorConfig.both->m_bIsFallback ? colorConfig.fail : colorConfig.both;
colorConfig.caps = colorConfig.caps->m_bIsFallback ? colorConfig.fail : colorConfig.caps;
colorConfig.num = colorConfig.num->m_bIsFallback ? colorConfig.fail : colorConfig.num;

colorState.inner = colorConfig.inner;
colorState.outer = *colorConfig.outer;
Expand Down Expand Up @@ -489,11 +487,11 @@ void CPasswordInputField::updateColors() {
//
CGradientValueData* targetGrad = nullptr;

if (g_pHyprlock->m_bCapsLock && NUMLOCK)
if (g_pHyprlock->m_bCapsLock && NUMLOCK && !colorConfig.both->m_bIsFallback)
targetGrad = colorConfig.both;
else if (g_pHyprlock->m_bCapsLock)
targetGrad = colorConfig.caps;
else if (NUMLOCK)
else if (NUMLOCK && !colorConfig.num->m_bIsFallback)
targetGrad = colorConfig.num;

if (checkWaiting)
Expand Down

0 comments on commit 3d63d9b

Please sign in to comment.