From cc72778d5efea1ddec360e04474fd702c312b394 Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Thu, 1 Feb 2024 22:59:42 +0100 Subject: [PATCH] plugins/nightcolor: clamp preview color temperature to be somewhat sane BUG: 480700 --- src/plugins/nightcolor/nightcolormanager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/nightcolor/nightcolormanager.cpp b/src/plugins/nightcolor/nightcolormanager.cpp index 00aa67c29a..3c1e9b6a93 100644 --- a/src/plugins/nightcolor/nightcolormanager.cpp +++ b/src/plugins/nightcolor/nightcolormanager.cpp @@ -447,6 +447,7 @@ void NightColorManager::slowUpdate(int targetTemp) void NightColorManager::preview(uint previewTemp) { + previewTemp = std::clamp(previewTemp, MIN_TEMPERATURE, DEFAULT_DAY_TEMPERATURE); resetQuickAdjustTimer((int)previewTemp); if (m_previewTimer) { m_previewTimer.reset();