Increase tray icon's bubble size

This commit is contained in:
Konstantinos Sideris 2017-05-22 17:35:17 +03:00
parent 0e04e4d00e
commit 9772f52876
2 changed files with 6 additions and 2 deletions

View file

@ -36,7 +36,7 @@ public:
int msgCount = 0; int msgCount = 0;
private: private:
const int BubbleDiameter = 15; const int BubbleDiameter = 17;
QIcon icon_; QIcon icon_;
}; };

View file

@ -28,6 +28,10 @@ MsgCountComposedIcon::MsgCountComposedIcon(const QString &filename)
void MsgCountComposedIcon::paint(QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state) void MsgCountComposedIcon::paint(QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state)
{ {
painter->setRenderHint(QPainter::TextAntialiasing);
painter->setRenderHint(QPainter::SmoothPixmapTransform);
painter->setRenderHint(QPainter::Antialiasing);
icon_.paint(painter, rect, Qt::AlignCenter, mode, state); icon_.paint(painter, rect, Qt::AlignCenter, mode, state);
if (msgCount <= 0) if (msgCount <= 0)
@ -42,7 +46,7 @@ void MsgCountComposedIcon::paint(QPainter *painter, const QRect &rect, QIcon::Mo
painter->setBrush(brush); painter->setBrush(brush);
painter->setPen(Qt::NoPen); painter->setPen(Qt::NoPen);
painter->setFont(QFont("Open Sans", 7, QFont::Black)); painter->setFont(QFont("Open Sans", 8, QFont::Black));
QRectF bubble(rect.width() - BubbleDiameter, QRectF bubble(rect.width() - BubbleDiameter,
rect.height() - BubbleDiameter, rect.height() - BubbleDiameter,