UI: Better Hide OBS Window description, add first time dialog & tooltip

This commit is contained in:
Matt Gajownik 2022-01-23 12:27:18 +11:00 committed by Jim
parent 59ab9c98fb
commit e2e751aa55
4 changed files with 28 additions and 1 deletions

View File

@ -778,7 +778,9 @@ Basic.Settings.General.Theme="Theme"
Basic.Settings.General.Language="Language"
Basic.Settings.General.EnableAutoUpdates="Automatically check for updates on startup"
Basic.Settings.General.OpenStatsOnStartup="Open stats dialog on startup"
Basic.Settings.General.HideOBSWindowsFromCapture="Hide OBS windows from display capture"
Basic.Settings.General.HideOBSWindowsFromCapture="Hide OBS windows from screen capture"
Basic.Settings.General.HideOBSWindowsFromCapture.Tooltip="This setting will hide all non-projector OBS Studio windows from being captured by OBS and affects \nother applications, such as conferencing, screen sharing, remote support, screenshots, and other capture software."
Basic.Settings.General.HideOBSWindowsFromCapture.Message="Enabling this option hides all non-projector OBS Studio windows from being captured by OBS and affects other applications, such as conferencing, screen sharing, remote support, screenshots, and other capture software."
Basic.Settings.General.WarnBeforeStartingStream="Show confirmation dialog when starting streams"
Basic.Settings.General.WarnBeforeStoppingStream="Show confirmation dialog when stopping streams"
Basic.Settings.General.WarnBeforeStoppingRecord="Show confirmation dialog when stopping recording"

View File

@ -250,6 +250,9 @@
<property name="text">
<string>Basic.Settings.General.HideOBSWindowsFromCapture</string>
</property>
<property name="toolTip">
<string>Basic.Settings.General.HideOBSWindowsFromCapture.Tooltip</string>
</property>
</widget>
</item>
</layout>

View File

@ -1241,6 +1241,9 @@ void OBSBasicSettings::LoadGeneralSettings()
config_get_bool(GetGlobalConfig(), "BasicWindow",
"HideOBSWindowsFromCapture");
ui->hideOBSFromCapture->setChecked(hideWindowFromCapture);
connect(ui->hideOBSFromCapture, SIGNAL(stateChanged(int)), this,
SLOT(HideOBSWindowWarning(int)));
}
#endif
@ -4209,6 +4212,24 @@ void OBSBasicSettings::SpeakerLayoutChanged(int idx)
}
}
void OBSBasicSettings::HideOBSWindowWarning(int state)
{
if (loading || state == Qt::Unchecked)
return;
if (config_get_bool(GetGlobalConfig(), "General",
"WarnedAboutHideOBSFromCapture"))
return;
OBSMessageBox::information(
this, QTStr("Basic.Settings.General.HideOBSWindowsFromCapture"),
QTStr("Basic.Settings.General.HideOBSWindowsFromCapture.Message"));
config_set_bool(GetGlobalConfig(), "General",
"WarnedAboutHideOBSFromCapture", true);
config_save_safe(GetGlobalConfig(), "tmp", nullptr);
}
/*
* resets current bitrate if too large and restricts the number of bitrates
* displayed when multichannel OFF

View File

@ -368,6 +368,7 @@ private slots:
void on_disableOSXVSync_clicked();
void GeneralChanged();
void HideOBSWindowWarning(int state);
void AudioChanged();
void AudioChangedRestart();
void ReloadAudioSources();