瀏覽代碼

Use system icon theme on Linux

Vignesh B 3 年之前
父節點
當前提交
0508d96e33
共有 1 個文件被更改,包括 7 次插入2 次删除
  1. 7 2
      src/main.cpp

+ 7 - 2
src/main.cpp

@@ -155,11 +155,16 @@ int main(int argc, char *argv[])
       qputenv("QT_SCALE_FACTOR", scale.toUtf8());
 
     QApplication app(newArgc, newArgv);
-#if defined(Q_OS_WIN)
-    // Setting window icon on OSX or Linux will break user ability to change it
+#if defined(Q_OS_WIN) 
+    // Setting window icon on OSX will break user ability to change it
     app.setWindowIcon(QIcon(":/images/icon.png"));
 #endif
 
+#if defined(Q_OS_LINUX)
+  	// Set window icon on Linux using system icon theme
+  	app.setWindowIcon(QIcon::fromTheme("com.github.iwalton3.jellyfin-media-player"));
+#endif
+
 #if defined(Q_OS_MAC) && defined(NDEBUG)
     PFMoveToApplicationsFolderIfNecessary();
 #endif