UI: Use macOS app icon for Qt app on macOS

This commit is contained in:
PatTheMav 2020-11-12 23:41:30 +01:00
parent 8110b8bd65
commit 9ac92f61be
No known key found for this signature in database
GPG Key ID: CEFD5D83C12A66B3
4 changed files with 16 additions and 1 deletions

View File

@ -10,6 +10,7 @@
<file>images/plus.svg</file>
<file>images/down.svg</file>
<file>images/up.svg</file>
<file>images/obs_256x256.png</file>
<file>images/obs.png</file>
<file>images/obs_macos.png</file>
<file>images/obs_paused.png</file>

View File

@ -1125,7 +1125,12 @@ OBSApp::OBSApp(int &argc, char **argv, profiler_name_store_t *store)
{
sleepInhibitor = os_inhibit_sleep_create("OBS Video/audio");
#ifdef __APPLE__
setWindowIcon(
QIcon::fromTheme("obs", QIcon(":/res/images/obs_256x256.png")));
#else
setWindowIcon(QIcon::fromTheme("obs", QIcon(":/res/images/obs.png")));
#endif
}
OBSApp::~OBSApp()

View File

@ -170,7 +170,12 @@ OBSBasicStats::OBSBasicStats(QWidget *parent, bool closeable)
resize(800, 280);
setWindowTitle(QTStr("Basic.Stats"));
#ifdef __APPLE__
setWindowIcon(
QIcon::fromTheme("obs", QIcon(":/res/images/obs_256x256.png")));
#else
setWindowIcon(QIcon::fromTheme("obs", QIcon(":/res/images/obs.png")));
#endif
setWindowModality(Qt::NonModal);
setAttribute(Qt::WA_DeleteOnClose, true);

View File

@ -31,8 +31,12 @@ OBSProjector::OBSProjector(QWidget *widget, obs_source_t *source_, int monitor,
setWindowFlags(Qt::WindowStaysOnTopHint);
type = type_;
#ifdef __APPLE__
setWindowIcon(
QIcon::fromTheme("obs", QIcon(":/res/images/obs_256x256.png")));
#else
setWindowIcon(QIcon::fromTheme("obs", QIcon(":/res/images/obs.png")));
#endif
if (monitor == -1)
resize(480, 270);