Revert "Merge pull request #3110 from WizardCM/taskbar-color-setting"

This reverts commit 04e01458e5, reversing
changes made to b83a9dd0d6.
This commit is contained in:
jp9000 2020-07-11 06:05:35 -07:00
parent aade26649b
commit 959dbb64ed
6 changed files with 7 additions and 51 deletions

View file

@ -653,10 +653,9 @@ Basic.Settings.General.RecordWhenStreaming="Automatically record when streaming"
Basic.Settings.General.KeepRecordingWhenStreamStops="Keep recording when stream stops"
Basic.Settings.General.ReplayBufferWhileStreaming="Automatically start replay buffer when streaming"
Basic.Settings.General.KeepReplayBufferStreamStops="Keep replay buffer active when stream stops"
Basic.Settings.General.SysTray="System Tray/Taskbar"
Basic.Settings.General.SysTray="System Tray"
Basic.Settings.General.SysTrayWhenStarted="Minimize to system tray when started"
Basic.Settings.General.SystemTrayHideMinimize="Always minimize to system tray instead of task bar"
Basic.Settings.General.TaskbarStatusColor="Change taskbar color when output is active"
Basic.Settings.General.SaveProjectors="Save projectors on exit"
Basic.Settings.General.Preview="Preview"
Basic.Settings.General.OverflowHidden="Hide overflow"

View file

@ -534,16 +534,6 @@
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="taskbarColor">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Basic.Settings.General.TaskbarStatusColor</string>
</property>
</widget>
</item>
<item row="1" column="0">
<spacer name="horizontalSpacer_2">
<property name="orientation">

View file

@ -420,10 +420,6 @@ bool OBSApp::InitGlobalConfigDefaults()
"KeepRecordingWhenStreamStops", false);
config_set_default_bool(globalConfig, "BasicWindow", "SysTrayEnabled",
true);
#ifdef _WIN32
config_set_default_bool(globalConfig, "BasicWindow",
"TaskbarStatusColor", true);
#endif
config_set_default_bool(globalConfig, "BasicWindow",
"SysTrayWhenStarted", false);
config_set_default_bool(globalConfig, "BasicWindow", "SaveProjectors",

View file

@ -5393,8 +5393,7 @@ inline void OBSBasic::OnActivate()
UpdateProcessPriority();
#ifdef _WIN32
if (taskbarStatusColor())
taskProg->show();
taskProg->show();
taskProg->resume();
taskProg->setValue(1);
taskBtn->setOverlayIcon(QIcon::fromTheme(
@ -5428,8 +5427,7 @@ inline void OBSBasic::OnDeactivate()
} else {
if (os_atomic_load_bool(&recording_paused)) {
#ifdef _WIN32
if (taskbarStatusColor())
taskProg->show();
taskProg->show();
taskProg->pause();
taskBtn->setOverlayIcon(QIcon::fromTheme(
"obs-paused",
@ -5440,8 +5438,7 @@ inline void OBSBasic::OnDeactivate()
QIcon(":/res/images/obs_paused.png"));
} else {
#ifdef _WIN32
if (taskbarStatusColor())
taskProg->show();
taskProg->show();
taskProg->resume();
taskBtn->setOverlayIcon(QIcon::fromTheme(
"obs-active",
@ -7455,13 +7452,7 @@ bool OBSBasic::sysTrayMinimizeToTray()
return config_get_bool(GetGlobalConfig(), "BasicWindow",
"SysTrayMinimizeToTray");
}
#ifdef _WIN32
bool OBSBasic::taskbarStatusColor()
{
return config_get_bool(GetGlobalConfig(), "BasicWindow",
"TaskbarStatusColor");
}
#endif
void OBSBasic::on_actionCopySource_triggered()
{
copyStrings.clear();

View file

@ -465,9 +465,6 @@ private:
void ReplayBufferClicked();
bool sysTrayMinimizeToTray();
#ifdef _WIN32
bool taskbarStatusColor();
#endif
void EnumDialogs();

View file

@ -398,9 +398,6 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
HookWidget(ui->systemTrayEnabled, CHECK_CHANGED, GENERAL_CHANGED);
HookWidget(ui->systemTrayWhenStarted,CHECK_CHANGED, GENERAL_CHANGED);
HookWidget(ui->systemTrayAlways, CHECK_CHANGED, GENERAL_CHANGED);
#ifdef _WIN32
HookWidget(ui->taskbarColor, CHECK_CHANGED, GENERAL_CHANGED);
#endif
HookWidget(ui->saveProjectors, CHECK_CHANGED, GENERAL_CHANGED);
HookWidget(ui->snappingEnabled, CHECK_CHANGED, GENERAL_CHANGED);
HookWidget(ui->screenSnapping, CHECK_CHANGED, GENERAL_CHANGED);
@ -632,7 +629,6 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
delete ui->enableNewSocketLoop;
delete ui->enableLowLatencyMode;
delete ui->browserHWAccel;
delete ui->taskbarColor;
delete ui->sourcesGroup;
#if defined(__APPLE__) || HAVE_PULSEAUDIO
delete ui->disableAudioDucking;
@ -647,7 +643,6 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
ui->enableNewSocketLoop = nullptr;
ui->enableLowLatencyMode = nullptr;
ui->browserHWAccel = nullptr;
ui->taskbarColor = nullptr;
ui->sourcesGroup = nullptr;
#if defined(__APPLE__) || HAVE_PULSEAUDIO
ui->disableAudioDucking = nullptr;
@ -1203,11 +1198,7 @@ void OBSBasicSettings::LoadGeneralSettings()
bool systemTrayAlways = config_get_bool(
GetGlobalConfig(), "BasicWindow", "SysTrayMinimizeToTray");
ui->systemTrayAlways->setChecked(systemTrayAlways);
#ifdef _WIN32
bool taskbarColor = config_get_bool(GetGlobalConfig(), "BasicWindow",
"TaskbarStatusColor");
ui->taskbarColor->setChecked(taskbarColor);
#endif
bool saveProjectors = config_get_bool(GetGlobalConfig(), "BasicWindow",
"SaveProjectors");
ui->saveProjectors->setChecked(saveProjectors);
@ -3003,15 +2994,7 @@ void OBSBasicSettings::SaveGeneralSettings()
config_set_bool(GetGlobalConfig(), "BasicWindow",
"SysTrayMinimizeToTray",
ui->systemTrayAlways->isChecked());
#ifdef _WIN32
if (WidgetChanged(ui->taskbarColor)) {
bool enable_color = ui->taskbarColor->isChecked();
config_set_bool(GetGlobalConfig(), "BasicWindow",
"TaskbarStatusColor", enable_color);
if (!enable_color)
main->taskProg->setVisible(enable_color);
}
#endif
if (WidgetChanged(ui->saveProjectors))
config_set_bool(GetGlobalConfig(), "BasicWindow",
"SaveProjectors",