From 4595052b5b5231e4d9ac7d82fa0bc9e7625b71df Mon Sep 17 00:00:00 2001 From: Evgeny Date: Mon, 27 Jul 2026 12:20:06 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20level=20bar=20dynamic=20color=20?= =?UTF-8?q?=E2=80=94=20red=20only=20above=2085%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/chatgui/src/inputbar.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/chatgui/src/inputbar.cpp b/tools/chatgui/src/inputbar.cpp index a375aa9d..691323ed 100644 --- a/tools/chatgui/src/inputbar.cpp +++ b/tools/chatgui/src/inputbar.cpp @@ -295,5 +295,9 @@ void InputBar::updateRecordingUI(int ms) { int pct = (int)((db + 70.0f) / 70.0f * 100.0f); if (pct < 0) pct = 0; if (pct > 100) pct = 100; m_levelBar->setValue(pct); + const char* color = pct < 60 ? "#27ae60" : pct < 85 ? "#f1c40f" : "#e74c3c"; + m_levelBar->setStyleSheet(QString( + "QProgressBar { border: 1px solid rgba(255,255,255,0.2); border-radius: 3px; background: rgba(0,0,0,0.3); }" + "QProgressBar::chunk { background: %1; border-radius: 2px; }").arg(color)); } }