Allow to set custom icon on Mac in native way (#264)

This commit is contained in:
ilya-fedin 2021-12-09 09:11:31 +04:00 committed by GitHub
parent 3d1eb14ff7
commit 39b3217dd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -149,6 +149,14 @@ QIcon CreateOfficialIcon(Main::Session *session) {
} }
QIcon CreateIcon(Main::Session *session) { QIcon CreateIcon(Main::Session *session) {
if constexpr (Platform::IsMac()) {
if ((!session || !session->supportMode())
&& (cCustomAppIcon() == 0)
&& !QFileInfo::exists(cWorkingDir() + "tdata/icon.png")) {
return QIcon();
}
}
auto result = CreateOfficialIcon(session); auto result = CreateOfficialIcon(session);
#if defined Q_OS_UNIX && !defined Q_OS_MAC #if defined Q_OS_UNIX && !defined Q_OS_MAC