mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Increase tray icon's bubble size
This commit is contained in:
parent
0e04e4d00e
commit
9772f52876
2 changed files with 6 additions and 2 deletions
|
@ -36,7 +36,7 @@ public:
|
|||
int msgCount = 0;
|
||||
|
||||
private:
|
||||
const int BubbleDiameter = 15;
|
||||
const int BubbleDiameter = 17;
|
||||
|
||||
QIcon icon_;
|
||||
};
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue