|
|
|
|
@ -52,6 +52,7 @@ void chat_core_save_ui_state_trampoline(void* arg);
|
|
|
|
|
|
|
|
|
|
#include "radio_audio_engine.h" |
|
|
|
|
#include "radiopanel.h" |
|
|
|
|
#include "flagpainter.h" |
|
|
|
|
#include <QLabel> |
|
|
|
|
#include <QPushButton> |
|
|
|
|
#include <QHBoxLayout> |
|
|
|
|
@ -61,15 +62,7 @@ static QIcon makeRadioIcon(const QColor& color) {
|
|
|
|
|
QPixmap pix(48, 48); |
|
|
|
|
pix.fill(Qt::transparent); |
|
|
|
|
QPainter p(&pix); |
|
|
|
|
p.setRenderHint(QPainter::Antialiasing); |
|
|
|
|
p.scale(2, 2); |
|
|
|
|
p.setPen(QPen(color, 1.7, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); |
|
|
|
|
p.setBrush(Qt::NoBrush); |
|
|
|
|
p.drawLine(QPointF(8.5, 1), QPointF(8.5, 9)); |
|
|
|
|
p.drawLine(QPointF(14.5, 7), QPointF(14.5, 9)); |
|
|
|
|
p.drawRoundedRect(QRectF(7, 9, 10, 13), 2, 2); |
|
|
|
|
p.drawRoundedRect(QRectF(9.5, 11.5, 5, 3), 0.5, 0.5); |
|
|
|
|
for (int y : {16, 18, 20}) p.drawLine(QPointF(9.5, y), QPointF(14.5, y)); |
|
|
|
|
FlagPainter::drawRadio(&p, 0, 0, 48, color); |
|
|
|
|
p.end(); |
|
|
|
|
QIcon icon; |
|
|
|
|
// Явно задаём все режимы: Qt не перекрашивает значок при checked/disabled.
|
|
|
|
|
|