Allow to set custom icon on Mac in native way (#264)
This commit is contained in:
parent
3d1eb14ff7
commit
39b3217dd3
1 changed files with 8 additions and 0 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue