From 9772f52876b902ed71e48632bc4d791b4f2ab5c4 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Mon, 22 May 2017 17:35:17 +0300 Subject: [PATCH] Increase tray icon's bubble size --- include/TrayIcon.h | 2 +- src/TrayIcon.cc | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/TrayIcon.h b/include/TrayIcon.h index bef8564f..7fe46ad3 100644 --- a/include/TrayIcon.h +++ b/include/TrayIcon.h @@ -36,7 +36,7 @@ public: int msgCount = 0; private: - const int BubbleDiameter = 15; + const int BubbleDiameter = 17; QIcon icon_; }; diff --git a/src/TrayIcon.cc b/src/TrayIcon.cc index 2673f1b0..3a227087 100644 --- a/src/TrayIcon.cc +++ b/src/TrayIcon.cc @@ -28,6 +28,10 @@ MsgCountComposedIcon::MsgCountComposedIcon(const QString &filename) 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); if (msgCount <= 0) @@ -42,7 +46,7 @@ void MsgCountComposedIcon::paint(QPainter *painter, const QRect &rect, QIcon::Mo painter->setBrush(brush); 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, rect.height() - BubbleDiameter,