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