diff --git a/tools/chatgui/src/capture_controls.h b/tools/chatgui/src/capture_controls.h index 7012b51f6..8c49db9da 100644 --- a/tools/chatgui/src/capture_controls.h +++ b/tools/chatgui/src/capture_controls.h @@ -130,11 +130,10 @@ inline QIcon controlIcon(const QPalette& palette, const QString& shape, const QS painter.translate(20, 18); for (int i = 0; i < 8; i++) { painter.drawLine(0, -10, 0, -15); painter.rotate(45); } painter.drawEllipse(QPointF(), 10, 10); painter.drawEllipse(QPointF(), 4, 4); - } else if (shape == "microphone" || shape == "microphone-muted") { + } else if (shape == "microphone") { painter.save(); painter.translate(7, 0); painter.scale(0.65, 0.65); painter.drawRoundedRect(QRectF(15, 3, 10, 19), 5, 5); painter.drawArc(QRectF(10, 12, 20, 16), 180 * 16, 180 * 16); painter.drawLine(20, 28, 20, 33); painter.drawLine(14, 33, 26, 33); - if (shape == "microphone-muted") painter.drawLine(9, 3, 32, 28); painter.restore(); labelRect = QRectF(1, 23, 38, 13); labelSize = 9; } else if (shape == "sound" || shape == "silent" || shape == "output") { if (shape == "output") { painter.save(); painter.translate(7, 0); painter.scale(0.65, 0.65); } diff --git a/tools/chatgui/src/stream_publish_window.cpp b/tools/chatgui/src/stream_publish_window.cpp index b2ad1862b..afe4b23d3 100644 --- a/tools/chatgui/src/stream_publish_window.cpp +++ b/tools/chatgui/src/stream_publish_window.cpp @@ -505,7 +505,11 @@ void StreamPublishWindow::updateMenuButtons() { update(m_rotation, "Rotation", "rotation", QStringLiteral("%1°").arg(config.video.rotation), {}, config.video.rotation); update(m_maxQp, "Maximum QP", "qp", value(m_maxQp).toInt() ? value(m_maxQp).toString() : "Auto", "QP"); update(m_microphone, "Audio source", config.audio ? "microphone" : "silent", config.audio ? selected(m_microphone)->text() : QString()); - m_sound->setIcon(controlIcon(palette(), m_sound->isChecked() ? "microphone" : "microphone-muted", QStringLiteral("Mute"))); + auto microphonePalette = palette(); + if (!m_sound->isChecked()) microphonePalette.setColor(QPalette::WindowText, QColor(220, 60, 60)); + auto microphoneIcon = controlIcon(microphonePalette, "microphone", QStringLiteral("Mute")); + microphoneIcon.addPixmap(microphoneIcon.pixmap(m_sound->iconSize()), QIcon::Disabled); // «Без звука» тоже остаётся красным. + m_sound->setIcon(microphoneIcon); m_sound->setToolTip(QStringLiteral("Mute")); m_sound->setAccessibleName(m_sound->toolTip()); m_menuBar->setFixedWidth(m_menuBar->sizeHint().width());