Merge pull request #3724 from PatTheMav/macos-bigsur-visuals
UI: Fix tray behaviour and app icon update for macOSmaster
commit
70001be8ae
|
@ -174,7 +174,7 @@ jobs:
|
|||
cp rundir/RelWithDebInfo/bin/obs-ffmpeg-mux ./OBS.app/Contents/MacOS
|
||||
cp rundir/RelWithDebInfo/bin/libobsglad.0.dylib ./OBS.app/Contents/MacOS
|
||||
cp -R rundir/RelWithDebInfo/data ./OBS.app/Contents/Resources
|
||||
cp ../CI/scripts/macos/app/obs.icns ./OBS.app/Contents/Resources
|
||||
cp ../CI/scripts/macos/app/AppIcon.icns ./OBS.app/Contents/Resources
|
||||
cp -R rundir/RelWithDebInfo/obs-plugins/ ./OBS.app/Contents/PlugIns
|
||||
cp ../CI/scripts/macos/app/Info.plist ./OBS.app/Contents
|
||||
|
||||
|
|
|
@ -383,7 +383,7 @@ prepare_macos_bundle() {
|
|||
cp rundir/${BUILD_CONFIG}/bin/obs-ffmpeg-mux ./OBS.app/Contents/MacOS
|
||||
cp rundir/${BUILD_CONFIG}/bin/libobsglad.0.dylib ./OBS.app/Contents/MacOS
|
||||
cp -R rundir/${BUILD_CONFIG}/data ./OBS.app/Contents/Resources
|
||||
cp ${CI_SCRIPTS}/app/obs.icns ./OBS.app/Contents/Resources
|
||||
cp ${CI_SCRIPTS}/app/AppIcon.icns ./OBS.app/Contents/Resources
|
||||
cp -R rundir/${BUILD_CONFIG}/obs-plugins/ ./OBS.app/Contents/PlugIns
|
||||
cp ${CI_SCRIPTS}/app/Info.plist ./OBS.app/Contents
|
||||
# Scripting plugins are required to be placed in same directory as binary
|
||||
|
|
Binary file not shown.
|
@ -3,7 +3,7 @@
|
|||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>obs.icns</string>
|
||||
<string>AppIcon.icns</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>OBS</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
|
|
Binary file not shown.
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"title": "OBS-Studio $$VERSION$$",
|
||||
"background": "$$CI_PATH$$/package/background.tiff",
|
||||
"icon": "$$CI_PATH$$/app/obs.icns",
|
||||
"icon": "$$CI_PATH$$/app/AppIcon.icns",
|
||||
"format": "ULFO",
|
||||
"icon-size": 96,
|
||||
"window": {
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 160 KiB |
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
|
@ -10,9 +10,13 @@
|
|||
<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>
|
||||
<file>images/obs_paused_macos.png</file>
|
||||
<file>images/tray_active.png</file>
|
||||
<file>images/tray_active_macos.png</file>
|
||||
<file>images/expand.svg</file>
|
||||
<file>images/unlocked.svg</file>
|
||||
<file>images/locked.svg</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()
|
||||
|
|
|
@ -5619,10 +5619,19 @@ inline void OBSBasic::OnActivate()
|
|||
App()->IncrementSleepInhibition();
|
||||
UpdateProcessPriority();
|
||||
|
||||
if (trayIcon && trayIcon->isVisible())
|
||||
if (trayIcon && trayIcon->isVisible()) {
|
||||
#ifdef __APPLE__
|
||||
QIcon trayMask =
|
||||
QIcon(":/res/images/tray_active_macos.png");
|
||||
trayMask.setIsMask(true);
|
||||
trayIcon->setIcon(
|
||||
QIcon::fromTheme("obs-tray", trayMask));
|
||||
#else
|
||||
trayIcon->setIcon(QIcon::fromTheme(
|
||||
"obs-tray-active",
|
||||
QIcon(":/res/images/tray_active.png")));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5637,19 +5646,42 @@ inline void OBSBasic::OnDeactivate()
|
|||
App()->DecrementSleepInhibition();
|
||||
ClearProcessPriority();
|
||||
|
||||
if (trayIcon && trayIcon->isVisible())
|
||||
trayIcon->setIcon(QIcon::fromTheme(
|
||||
"obs-tray", QIcon(":/res/images/obs.png")));
|
||||
if (trayIcon && trayIcon->isVisible()) {
|
||||
#ifdef __APPLE__
|
||||
QIcon trayIconFile =
|
||||
QIcon(":/res/images/obs_macos.png");
|
||||
trayIconFile.setIsMask(true);
|
||||
#else
|
||||
QIcon trayIconFile = QIcon(":/res/images/obs.png");
|
||||
#endif
|
||||
trayIcon->setIcon(
|
||||
QIcon::fromTheme("obs-tray", trayIconFile));
|
||||
}
|
||||
} else if (outputHandler->Active() && trayIcon &&
|
||||
trayIcon->isVisible()) {
|
||||
if (os_atomic_load_bool(&recording_paused))
|
||||
trayIcon->setIcon(QIcon::fromTheme(
|
||||
"obs-tray-paused",
|
||||
QIcon(":/res/images/obs_paused.png")));
|
||||
else
|
||||
trayIcon->setIcon(QIcon::fromTheme(
|
||||
"obs-tray-active",
|
||||
QIcon(":/res/images/tray_active.png")));
|
||||
if (os_atomic_load_bool(&recording_paused)) {
|
||||
#ifdef __APPLE__
|
||||
QIcon trayIconFile =
|
||||
QIcon(":/res/images/obs_paused_macos.png");
|
||||
trayIconFile.setIsMask(true);
|
||||
#else
|
||||
QIcon trayIconFile =
|
||||
QIcon(":/res/images/obs_paused.png");
|
||||
#endif
|
||||
trayIcon->setIcon(QIcon::fromTheme("obs-tray-paused",
|
||||
trayIconFile));
|
||||
} else {
|
||||
#ifdef __APPLE__
|
||||
QIcon trayIconFile =
|
||||
QIcon(":/res/images/tray_active_macos.png");
|
||||
trayIconFile.setIsMask(true);
|
||||
#else
|
||||
QIcon trayIconFile =
|
||||
QIcon(":/res/images/tray_active.png");
|
||||
#endif
|
||||
trayIcon->setIcon(QIcon::fromTheme("obs-tray-active",
|
||||
trayIconFile));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7536,9 +7568,14 @@ void OBSBasic::ToggleShowHide()
|
|||
|
||||
void OBSBasic::SystemTrayInit()
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
QIcon trayIconFile = QIcon(":/res/images/obs_macos.png");
|
||||
trayIconFile.setIsMask(true);
|
||||
#else
|
||||
QIcon trayIconFile = QIcon(":/res/images/obs.png");
|
||||
#endif
|
||||
trayIcon.reset(new QSystemTrayIcon(
|
||||
QIcon::fromTheme("obs-tray", QIcon(":/res/images/obs.png")),
|
||||
this));
|
||||
QIcon::fromTheme("obs-tray", trayIconFile), this));
|
||||
trayIcon->setToolTip("OBS Studio");
|
||||
|
||||
showHide = new QAction(QTStr("Basic.SystemTray.Show"), trayIcon.data());
|
||||
|
@ -7593,10 +7630,12 @@ void OBSBasic::IconActivated(QSystemTrayIcon::ActivationReason reason)
|
|||
AddProjectorMenuMonitors(studioProgramProjector, this,
|
||||
SLOT(OpenStudioProgramProjector()));
|
||||
|
||||
#ifndef __APPLE__
|
||||
if (reason == QSystemTrayIcon::Trigger) {
|
||||
EnablePreviewDisplay(previewEnabled && !isVisible());
|
||||
ToggleShowHide();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void OBSBasic::SysTrayNotify(const QString &text,
|
||||
|
@ -8114,10 +8153,18 @@ void OBSBasic::PauseRecording()
|
|||
|
||||
ui->statusbar->RecordingPaused();
|
||||
|
||||
if (trayIcon && trayIcon->isVisible())
|
||||
trayIcon->setIcon(QIcon::fromTheme(
|
||||
"obs-tray-paused",
|
||||
QIcon(":/res/images/obs_paused.png")));
|
||||
if (trayIcon && trayIcon->isVisible()) {
|
||||
#ifdef __APPLE__
|
||||
QIcon trayIconFile =
|
||||
QIcon(":/res/images/obs_paused_macos.png");
|
||||
trayIconFile.setIsMask(true);
|
||||
#else
|
||||
QIcon trayIconFile =
|
||||
QIcon(":/res/images/obs_paused.png");
|
||||
#endif
|
||||
trayIcon->setIcon(QIcon::fromTheme("obs-tray-paused",
|
||||
trayIconFile));
|
||||
}
|
||||
|
||||
os_atomic_set_bool(&recording_paused, true);
|
||||
|
||||
|
@ -8145,10 +8192,18 @@ void OBSBasic::UnpauseRecording()
|
|||
|
||||
ui->statusbar->RecordingUnpaused();
|
||||
|
||||
if (trayIcon && trayIcon->isVisible())
|
||||
trayIcon->setIcon(QIcon::fromTheme(
|
||||
"obs-tray-active",
|
||||
QIcon(":/res/images/tray_active.png")));
|
||||
if (trayIcon && trayIcon->isVisible()) {
|
||||
#ifdef __APPLE__
|
||||
QIcon trayIconFile =
|
||||
QIcon(":/res/images/tray_active_macos.png");
|
||||
trayIconFile.setIsMask(true);
|
||||
#else
|
||||
QIcon trayIconFile =
|
||||
QIcon(":/res/images/tray_active.png");
|
||||
#endif
|
||||
trayIcon->setIcon(QIcon::fromTheme("obs-tray-active",
|
||||
trayIconFile));
|
||||
}
|
||||
|
||||
os_atomic_set_bool(&recording_paused, false);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue