Skip to content

Commit

Permalink
Use system icon theme on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
viggy96 committed May 1, 2021
1 parent dfe0664 commit b8e6288
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b8e6288

Please sign in to comment.