input-field: fix invert_numlock regression (#530)

This commit is contained in:
Maximilian Seidler 2024-10-25 23:04:56 +02:00 committed by GitHub
parent f13d97e6d6
commit ae3bb0fd43
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -432,7 +432,7 @@ static void changeColor(const CColor& source, const CColor& target, CColor& subj
void CPasswordInputField::updateColors() {
const bool BORDERLESS = outThick == 0;
const bool NUMLOCK = g_pHyprlock->m_bNumLock || (colorConfig.invertNum && !g_pHyprlock->m_bNumLock);
const bool NUMLOCK = (colorConfig.invertNum) ? !g_pHyprlock->m_bNumLock : g_pHyprlock->m_bNumLock;
const auto MULTI = colorConfig.transitionMs == 0 ?
1.0 :
std::clamp(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now() - colorState.lastFrame).count() / (double)colorConfig.transitionMs,