diff main/main.cpp @ 141:c3114dffdff4

* Add svg-based icon
author Chris Cannam
date Wed, 02 May 2007 10:50:32 +0000
parents 006c90387f40
children dfaf4f9330b5
line wrap: on
line diff
--- a/main/main.cpp	Mon Apr 30 14:31:39 2007 +0000
+++ b/main/main.cpp	Wed May 02 10:50:32 2007 +0000
@@ -223,7 +223,13 @@
     QApplication::setOrganizationName("sonic-visualiser");
     QApplication::setOrganizationDomain("sonicvisualiser.org");
     QApplication::setApplicationName("sonic-visualiser");
-    QApplication::setWindowIcon(QIcon(":icons/svicon16.png"));
+
+    QIcon icon;
+    int sizes[] = { 16, 22, 24, 32, 48, 64, 128 };
+    for (int i = 0; i < sizeof(sizes)/sizeof(sizes[0]); ++i) {
+        icon.addFile(QString(":icons/sv-%1x%2.png").arg(sizes[i]).arg(sizes[i]));
+    }
+    QApplication::setWindowIcon(icon);
 
     QString language = QLocale::system().name();