mirror of
				https://github.com/Swordfish90/cool-retro-term.git
				synced 2025-10-31 15:12:28 +00:00 
			
		
		
		
	Set window application icon.
This commit is contained in:
		| @@ -5,6 +5,7 @@ | |||||||
| #include <QStringList> | #include <QStringList> | ||||||
|  |  | ||||||
| #include <QtWidgets/QApplication> | #include <QtWidgets/QApplication> | ||||||
|  | #include <QIcon> | ||||||
|  |  | ||||||
| #include <QDebug> | #include <QDebug> | ||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
| @@ -38,6 +39,12 @@ int main(int argc, char *argv[]) | |||||||
|     QQmlApplicationEngine engine; |     QQmlApplicationEngine engine; | ||||||
|     FileIO fileIO; |     FileIO fileIO; | ||||||
|  |  | ||||||
|  | #if !defined(Q_OS_MAC) | ||||||
|  |     app.setWindowIcon(QIcon::fromTheme("cool-retro-term", QIcon(":../icons/32x32/cool-retro-term.png"))); | ||||||
|  | #else | ||||||
|  |     app.setWindowIcon(QIcon(":../icons/32x32/cool-retro-term.png")); | ||||||
|  | #endif | ||||||
|  |  | ||||||
|     // Manage command line arguments from the cpp side |     // Manage command line arguments from the cpp side | ||||||
|     QStringList args = app.arguments(); |     QStringList args = app.arguments(); | ||||||
|     if (args.contains("-h") || args.contains("--help")) { |     if (args.contains("-h") || args.contains("--help")) { | ||||||
|   | |||||||
| @@ -51,5 +51,6 @@ | |||||||
|         <file>fonts/modern-inconsolata/Inconsolata.otf</file> |         <file>fonts/modern-inconsolata/Inconsolata.otf</file> | ||||||
|         <file>SettingsScreenTab.qml</file> |         <file>SettingsScreenTab.qml</file> | ||||||
|         <file>fonts/modern-fixedsys-excelsior/FSEX301-L2.ttf</file> |         <file>fonts/modern-fixedsys-excelsior/FSEX301-L2.ttf</file> | ||||||
|  |         <file>../icons/32x32/cool-retro-term.png</file> | ||||||
|     </qresource> |     </qresource> | ||||||
| </RCC> | </RCC> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user