diff options
-rw-r--r-- | src-qt5/core/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp index be20b78e..6736359c 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp @@ -79,7 +79,7 @@ void TrayIcon::updateIcon(){ if(AID==0){ return; } //Make sure the icon is square QSize icosize = this->size(); - LSession::handle()->XCB->ResizeWindow(AID, icosize.width(), icosize.height()); + LSession::handle()->XCB->ResizeWindow(AID, icosize.width()*2, icosize.height()*2); QTimer::singleShot(500, this, SLOT(update()) ); //make sure to re-draw the window in a moment } @@ -100,10 +100,10 @@ void TrayIcon::paintEvent(QPaintEvent *event){ //qDebug() << " - Get image:" << AID; QPixmap pix = LSession::handle()->XCB->TrayImage(AID); //= WIN->icon().pixmap(this->size()); - qDebug() << " - Pix size:" << pix.size().width() << pix.size().height(); - qDebug() << " - Geom:" << this->geometry().x() << this->geometry().y() << this->geometry().width() << this->geometry().height(); + //qDebug() << " - Pix size:" << pix.size().width() << pix.size().height(); + //qDebug() << " - Geom:" << this->geometry().x() << this->geometry().y() << this->geometry().width() << this->geometry().height(); if(!pix.isNull()){ - if(this->size() != pix.size()){ QTimer::singleShot(10, this, SLOT(updateIcon())); } + if((this->size()*2) != pix.size()){ QTimer::singleShot(10, this, SLOT(updateIcon())); } painter.drawPixmap(0,0,this->width(), this->height(), pix.scaled(this->size(), Qt::KeepAspectRatio, Qt::SmoothTransformation) ); badpaints = 0; //good paint }else{ |