UI: Fix wrong icon if recording stopped while paused

master
Ford Smith 2019-11-22 13:37:51 -05:00 committed by jp9000
parent c290e81a1a
commit eeafb3dbb3
1 changed files with 7 additions and 5 deletions

View File

@ -5087,6 +5087,9 @@ inline void OBSBasic::OnActivate()
}
}
extern volatile bool recording_paused;
extern volatile bool replaybuf_active;
inline void OBSBasic::OnDeactivate()
{
if (!outputHandler->Active() && !ui->profileMenu->isEnabled()) {
@ -5098,8 +5101,10 @@ inline void OBSBasic::OnDeactivate()
if (trayIcon)
trayIcon->setIcon(QIcon::fromTheme(
"obs-tray", QIcon(":/res/images/obs.png")));
} else {
if (trayIcon)
} else if (trayIcon) {
if (os_atomic_load_bool(&recording_paused))
trayIcon->setIcon(QIcon(":/res/images/obs_paused.png"));
else
trayIcon->setIcon(
QIcon(":/res/images/tray_active.png"));
}
@ -5507,9 +5512,6 @@ void OBSBasic::RecordingStop(int code, QString last_error)
#define RP_NO_HOTKEY_TITLE QTStr("Output.ReplayBuffer.NoHotkey.Title")
#define RP_NO_HOTKEY_TEXT QTStr("Output.ReplayBuffer.NoHotkey.Msg")
extern volatile bool recording_paused;
extern volatile bool replaybuf_active;
void OBSBasic::ShowReplayBufferPauseWarning()
{
auto msgBox = []() {