Add desktop network traffic graphs and unify microphone icons

This commit is contained in:
evgeny committed 2026-11-01 14:45:01 +01:00
1 parent 3dff681ff0
commit e384d4cf3d
26 files changed
+809 -29

No files matched your search

+7 -13
View File
@@ -1,6 +1,7 @@
#include <QCoreApplication>
#include "callwindow.h"
#include "capture_controls.h"
#include "outline_icon.h"
#include "../transport/gui_bridge.h"
#include "call_audio_engine.h"
#include "call_audio_graphs.h"
@@ -196,22 +197,13 @@ static void drawPhoneGlyph(QPainter* p, const QRectF& r, bool down) {
p->restore();
}
/* Тот же контур и толщина штриха, что у микрофона в панели ввода. */
static void drawMicGlyph(QPainter* p, const QRectF& r, bool off) {
const qreal s = r.width();
const QPointF c = r.center();
p->save();
QPen pen(Qt::white, s * 0.09, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
p->setPen(pen);
p->translate(r.topLeft()); p->scale(r.width() / 24.0, r.height() / 24.0);
p->setPen(QPen(Qt::white, 1.8, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
p->setBrush(Qt::NoBrush);
const qreal cw = s * 0.30;
p->drawRoundedRect(QRectF(c.x() - cw / 2, r.top() + s * 0.10, cw, s * 0.40), cw / 2, cw / 2);
p->drawArc(QRectF(c.x() - s * 0.20, r.top() + s * 0.42, s * 0.40, s * 0.26), 180 * 16, 180 * 16);
p->drawLine(QPointF(c.x(), r.top() + s * 0.60), QPointF(c.x(), r.top() + s * 0.68));
p->drawLine(QPointF(c.x() - s * 0.17, r.top() + s * 0.68), QPointF(c.x() + s * 0.17, r.top() + s * 0.68));
if (off) {
p->setPen(QPen(Qt::white, s * 0.09, Qt::SolidLine, Qt::RoundCap));
p->drawLine(QPointF(c.x() - s * 0.26, c.y() - s * 0.26), QPointF(c.x() + s * 0.26, c.y() + s * 0.26));
}
p->drawPath(microphoneOutline(off));
p->restore();
}
@@ -356,7 +348,9 @@ CallWindow::CallWindow(QWidget* parent)
m_declineBtn = makeRoundBtn(makeRoundIcon(QColor("#e74c3c"), Glyph::PhoneDown, 96), QCoreApplication::translate("ChatGui", "Decline"), this);
m_hangupBtn = makeRoundBtn(makeRoundIcon(QColor("#e74c3c"), Glyph::PhoneDown, 96), QCoreApplication::translate("ChatGui", "End call"), this);
m_muteBtn = makeRoundBtn(makeRoundIcon(QColor("#7f8c8d"), Glyph::Mic, 96), QCoreApplication::translate("ChatGui", "Mute"), this);
m_muteBtn->setObjectName(QStringLiteral("callMuteButton"));
m_muteBtn->setCheckable(true);
DEBUG_DEBUG(DEBUG_CATEGORY_CALL, "call microphone button initialized icon=shared-outline muted_icon=diagonal-strike");
auto* root = new QVBoxLayout(this);
root->setContentsMargins(12, 12, 12, 12);