changeset 970:c80777457133

(issue50) Add window icon and icon for 48x48px
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 28 Aug 2014 14:50:06 +0200
parents c096881e8ed0
children d3258a6faedd
files ui/icons.qrc ui/img/tray_48.png ui/mainwindow.cpp ui/trayicon.cpp
diffstat 4 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ui/icons.qrc	Thu Aug 28 14:43:47 2014 +0200
+++ b/ui/icons.qrc	Thu Aug 28 14:50:06 2014 +0200
@@ -1,6 +1,7 @@
 <!DOCTYPE RCC><RCC version="1.0">
 <qresource>
     <file>img/tray_22.png</file>
+    <file>img/tray_48.png</file>
     <file>img/logo.png</file>
     <file>img/list-add.png</file>
     <file>img/list-remove.png</file>
Binary file ui/img/tray_48.png has changed
--- a/ui/mainwindow.cpp	Thu Aug 28 14:43:47 2014 +0200
+++ b/ui/mainwindow.cpp	Thu Aug 28 14:50:06 2014 +0200
@@ -468,6 +468,7 @@
 void MainWindow::createTrayIcon()
 {
     QIcon trayImg(":/img/tray_22.png");
+    trayImg.addFile(":/img/tray_48.png", QSize(48,48));
 
     mTrayMenu = new QMenu(this);
     mTrayMenu->addAction(mCheckUpdates);
--- a/ui/trayicon.cpp	Thu Aug 28 14:43:47 2014 +0200
+++ b/ui/trayicon.cpp	Thu Aug 28 14:50:06 2014 +0200
@@ -49,7 +49,8 @@
         connect(mMessageBox->button(QMessageBox::Ok), SIGNAL(clicked()), this, SIGNAL(messageClicked()));
         connect(mMessageBox, SIGNAL(destroyed()), this, SLOT(messageDestroyed()));
     }
-    mMessageBox->setIconPixmap (icon().pixmap(mMessageBox->iconPixmap().size()));
+    mMessageBox->setIconPixmap(icon().pixmap(mMessageBox->iconPixmap().size()));
+    mMessageBox->setWindowIcon(icon());
     mMessageBox->button(QMessageBox::Ok)->setText (tr("Install update"));
     mMessageBox->button(QMessageBox::No)->setText (tr("Remind me later"));
     mMessageBox->show();

http://wald.intevation.org/projects/trustbridge/