aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-04-28 09:42:17 -0400
committerKen Moore <ken@ixsystems.com>2017-04-28 09:42:17 -0400
commit504a6531ecd8215a374b53ccb1bbb3b4fbda9e62 (patch)
treed3b89626a8f430a2429b39e6762fa93855cc8ef5 /src-qt5
parentGet lumina-mediaplayer saving/loading user settings on new start. (diff)
downloadlumina-504a6531ecd8215a374b53ccb1bbb3b4fbda9e62.tar.gz
lumina-504a6531ecd8215a374b53ccb1bbb3b4fbda9e62.tar.bz2
lumina-504a6531ecd8215a374b53ccb1bbb3b4fbda9e62.zip
Fix up the pixellation of the system tray icons on high DPI screens with the Qt5 auto-scaling set.
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp8
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{
bgstack15