|
@@ -1,5 +1,6 @@
|
|
|
#include "OBSBasicControls.hpp"
|
|
|
#include "OBSBasic.hpp"
|
|
|
+#include "qt-wrappers.hpp"
|
|
|
|
|
|
#include "moc_OBSBasicControls.cpp"
|
|
|
|
|
@@ -121,7 +122,7 @@ void OBSBasicControls::StreamingStarting(bool broadcastAutoStart)
|
|
|
void OBSBasicControls::StreamingStarted(bool withDelay)
|
|
|
{
|
|
|
ui->streamButton->setEnabled(true);
|
|
|
- ui->streamButton->setChecked(true);
|
|
|
+ setClasses(ui->streamButton, "state-active");
|
|
|
ui->streamButton->setText(QTStr("Basic.Main.StopStreaming"));
|
|
|
|
|
|
if (withDelay) {
|
|
@@ -139,7 +140,7 @@ void OBSBasicControls::StreamingStopping()
|
|
|
void OBSBasicControls::StreamingStopped(bool withDelay)
|
|
|
{
|
|
|
ui->streamButton->setEnabled(true);
|
|
|
- ui->streamButton->setChecked(false);
|
|
|
+ setClasses(ui->streamButton, "");
|
|
|
ui->streamButton->setText(QTStr("Basic.Main.StartStreaming"));
|
|
|
|
|
|
if (withDelay) {
|
|
@@ -155,7 +156,7 @@ void OBSBasicControls::StreamingStopped(bool withDelay)
|
|
|
|
|
|
void OBSBasicControls::BroadcastStreamReady(bool ready)
|
|
|
{
|
|
|
- ui->broadcastButton->setChecked(ready);
|
|
|
+ setClasses(ui->broadcastButton, ready ? "state-active" : "");
|
|
|
}
|
|
|
|
|
|
void OBSBasicControls::BroadcastStreamActive()
|
|
@@ -176,7 +177,7 @@ void OBSBasicControls::BroadcastStreamStarted(bool autoStop)
|
|
|
|
|
|
void OBSBasicControls::RecordingStarted(bool pausable)
|
|
|
{
|
|
|
- ui->recordButton->setChecked(true);
|
|
|
+ setClasses(ui->recordButton, "state-active");
|
|
|
ui->recordButton->setText(QTStr("Basic.Main.StopRecording"));
|
|
|
|
|
|
if (pausable) {
|
|
@@ -189,7 +190,7 @@ void OBSBasicControls::RecordingPaused()
|
|
|
{
|
|
|
QString text = QTStr("Basic.Main.UnpauseRecording");
|
|
|
|
|
|
- ui->pauseRecordButton->setChecked(true);
|
|
|
+ setClasses(ui->pauseRecordButton, "icon-media-pause state-active");
|
|
|
ui->pauseRecordButton->setAccessibleName(text);
|
|
|
ui->pauseRecordButton->setToolTip(text);
|
|
|
|
|
@@ -200,7 +201,7 @@ void OBSBasicControls::RecordingUnpaused()
|
|
|
{
|
|
|
QString text = QTStr("Basic.Main.PauseRecording");
|
|
|
|
|
|
- ui->pauseRecordButton->setChecked(false);
|
|
|
+ setClasses(ui->pauseRecordButton, "icon-media-pause");
|
|
|
ui->pauseRecordButton->setAccessibleName(text);
|
|
|
ui->pauseRecordButton->setToolTip(text);
|
|
|
|
|
@@ -214,7 +215,7 @@ void OBSBasicControls::RecordingStopping()
|
|
|
|
|
|
void OBSBasicControls::RecordingStopped()
|
|
|
{
|
|
|
- ui->recordButton->setChecked(false);
|
|
|
+ setClasses(ui->recordButton, "");
|
|
|
ui->recordButton->setText(QTStr("Basic.Main.StartRecording"));
|
|
|
|
|
|
ui->pauseRecordButton->setVisible(false);
|
|
@@ -222,7 +223,7 @@ void OBSBasicControls::RecordingStopped()
|
|
|
|
|
|
void OBSBasicControls::ReplayBufferStarted()
|
|
|
{
|
|
|
- ui->replayBufferButton->setChecked(true);
|
|
|
+ setClasses(ui->replayBufferButton, "state-active");
|
|
|
ui->replayBufferButton->setText(QTStr("Basic.Main.StopReplayBuffer"));
|
|
|
|
|
|
ui->saveReplayButton->setVisible(true);
|
|
@@ -235,7 +236,7 @@ void OBSBasicControls::ReplayBufferStopping()
|
|
|
|
|
|
void OBSBasicControls::ReplayBufferStopped()
|
|
|
{
|
|
|
- ui->replayBufferButton->setChecked(false);
|
|
|
+ setClasses(ui->replayBufferButton, "");
|
|
|
ui->replayBufferButton->setText(QTStr("Basic.Main.StartReplayBuffer"));
|
|
|
|
|
|
ui->saveReplayButton->setVisible(false);
|
|
@@ -243,19 +244,19 @@ void OBSBasicControls::ReplayBufferStopped()
|
|
|
|
|
|
void OBSBasicControls::VirtualCamStarted()
|
|
|
{
|
|
|
- ui->virtualCamButton->setChecked(true);
|
|
|
+ setClasses(ui->virtualCamButton, "state-active");
|
|
|
ui->virtualCamButton->setText(QTStr("Basic.Main.StopVirtualCam"));
|
|
|
}
|
|
|
|
|
|
void OBSBasicControls::VirtualCamStopped()
|
|
|
{
|
|
|
- ui->virtualCamButton->setChecked(false);
|
|
|
+ setClasses(ui->virtualCamButton, "");
|
|
|
ui->virtualCamButton->setText(QTStr("Basic.Main.StartVirtualCam"));
|
|
|
}
|
|
|
|
|
|
void OBSBasicControls::UpdateStudioModeState(bool enabled)
|
|
|
{
|
|
|
- ui->modeSwitch->setChecked(enabled);
|
|
|
+ setClasses(ui->modeSwitch, enabled ? "state-active" : "");
|
|
|
}
|
|
|
|
|
|
void OBSBasicControls::EnableBroadcastFlow(bool enabled)
|