提交 959dbb64 编写于 作者: J jp9000

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

This reverts commit 04e01458, reversing
changes made to b83a9dd0.
上级 aade2664
...@@ -653,10 +653,9 @@ Basic.Settings.General.RecordWhenStreaming="Automatically record when streaming" ...@@ -653,10 +653,9 @@ Basic.Settings.General.RecordWhenStreaming="Automatically record when streaming"
Basic.Settings.General.KeepRecordingWhenStreamStops="Keep recording when stream stops" Basic.Settings.General.KeepRecordingWhenStreamStops="Keep recording when stream stops"
Basic.Settings.General.ReplayBufferWhileStreaming="Automatically start replay buffer when streaming" Basic.Settings.General.ReplayBufferWhileStreaming="Automatically start replay buffer when streaming"
Basic.Settings.General.KeepReplayBufferStreamStops="Keep replay buffer active when stream stops" 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.SysTrayWhenStarted="Minimize to system tray when started"
Basic.Settings.General.SystemTrayHideMinimize="Always minimize to system tray instead of task bar" 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.SaveProjectors="Save projectors on exit"
Basic.Settings.General.Preview="Preview" Basic.Settings.General.Preview="Preview"
Basic.Settings.General.OverflowHidden="Hide overflow" Basic.Settings.General.OverflowHidden="Hide overflow"
......
...@@ -534,16 +534,6 @@ ...@@ -534,16 +534,6 @@
</property> </property>
</widget> </widget>
</item> </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"> <item row="1" column="0">
<spacer name="horizontalSpacer_2"> <spacer name="horizontalSpacer_2">
<property name="orientation"> <property name="orientation">
......
...@@ -420,10 +420,6 @@ bool OBSApp::InitGlobalConfigDefaults() ...@@ -420,10 +420,6 @@ bool OBSApp::InitGlobalConfigDefaults()
"KeepRecordingWhenStreamStops", false); "KeepRecordingWhenStreamStops", false);
config_set_default_bool(globalConfig, "BasicWindow", "SysTrayEnabled", config_set_default_bool(globalConfig, "BasicWindow", "SysTrayEnabled",
true); true);
#ifdef _WIN32
config_set_default_bool(globalConfig, "BasicWindow",
"TaskbarStatusColor", true);
#endif
config_set_default_bool(globalConfig, "BasicWindow", config_set_default_bool(globalConfig, "BasicWindow",
"SysTrayWhenStarted", false); "SysTrayWhenStarted", false);
config_set_default_bool(globalConfig, "BasicWindow", "SaveProjectors", config_set_default_bool(globalConfig, "BasicWindow", "SaveProjectors",
......
...@@ -5393,8 +5393,7 @@ inline void OBSBasic::OnActivate() ...@@ -5393,8 +5393,7 @@ inline void OBSBasic::OnActivate()
UpdateProcessPriority(); UpdateProcessPriority();
#ifdef _WIN32 #ifdef _WIN32
if (taskbarStatusColor()) taskProg->show();
taskProg->show();
taskProg->resume(); taskProg->resume();
taskProg->setValue(1); taskProg->setValue(1);
taskBtn->setOverlayIcon(QIcon::fromTheme( taskBtn->setOverlayIcon(QIcon::fromTheme(
...@@ -5428,8 +5427,7 @@ inline void OBSBasic::OnDeactivate() ...@@ -5428,8 +5427,7 @@ inline void OBSBasic::OnDeactivate()
} else { } else {
if (os_atomic_load_bool(&recording_paused)) { if (os_atomic_load_bool(&recording_paused)) {
#ifdef _WIN32 #ifdef _WIN32
if (taskbarStatusColor()) taskProg->show();
taskProg->show();
taskProg->pause(); taskProg->pause();
taskBtn->setOverlayIcon(QIcon::fromTheme( taskBtn->setOverlayIcon(QIcon::fromTheme(
"obs-paused", "obs-paused",
...@@ -5440,8 +5438,7 @@ inline void OBSBasic::OnDeactivate() ...@@ -5440,8 +5438,7 @@ inline void OBSBasic::OnDeactivate()
QIcon(":/res/images/obs_paused.png")); QIcon(":/res/images/obs_paused.png"));
} else { } else {
#ifdef _WIN32 #ifdef _WIN32
if (taskbarStatusColor()) taskProg->show();
taskProg->show();
taskProg->resume(); taskProg->resume();
taskBtn->setOverlayIcon(QIcon::fromTheme( taskBtn->setOverlayIcon(QIcon::fromTheme(
"obs-active", "obs-active",
...@@ -7455,13 +7452,7 @@ bool OBSBasic::sysTrayMinimizeToTray() ...@@ -7455,13 +7452,7 @@ bool OBSBasic::sysTrayMinimizeToTray()
return config_get_bool(GetGlobalConfig(), "BasicWindow", return config_get_bool(GetGlobalConfig(), "BasicWindow",
"SysTrayMinimizeToTray"); "SysTrayMinimizeToTray");
} }
#ifdef _WIN32
bool OBSBasic::taskbarStatusColor()
{
return config_get_bool(GetGlobalConfig(), "BasicWindow",
"TaskbarStatusColor");
}
#endif
void OBSBasic::on_actionCopySource_triggered() void OBSBasic::on_actionCopySource_triggered()
{ {
copyStrings.clear(); copyStrings.clear();
......
...@@ -465,9 +465,6 @@ private: ...@@ -465,9 +465,6 @@ private:
void ReplayBufferClicked(); void ReplayBufferClicked();
bool sysTrayMinimizeToTray(); bool sysTrayMinimizeToTray();
#ifdef _WIN32
bool taskbarStatusColor();
#endif
void EnumDialogs(); void EnumDialogs();
......
...@@ -398,9 +398,6 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent) ...@@ -398,9 +398,6 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
HookWidget(ui->systemTrayEnabled, CHECK_CHANGED, GENERAL_CHANGED); HookWidget(ui->systemTrayEnabled, CHECK_CHANGED, GENERAL_CHANGED);
HookWidget(ui->systemTrayWhenStarted,CHECK_CHANGED, GENERAL_CHANGED); HookWidget(ui->systemTrayWhenStarted,CHECK_CHANGED, GENERAL_CHANGED);
HookWidget(ui->systemTrayAlways, 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->saveProjectors, CHECK_CHANGED, GENERAL_CHANGED);
HookWidget(ui->snappingEnabled, CHECK_CHANGED, GENERAL_CHANGED); HookWidget(ui->snappingEnabled, CHECK_CHANGED, GENERAL_CHANGED);
HookWidget(ui->screenSnapping, CHECK_CHANGED, GENERAL_CHANGED); HookWidget(ui->screenSnapping, CHECK_CHANGED, GENERAL_CHANGED);
...@@ -632,7 +629,6 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent) ...@@ -632,7 +629,6 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
delete ui->enableNewSocketLoop; delete ui->enableNewSocketLoop;
delete ui->enableLowLatencyMode; delete ui->enableLowLatencyMode;
delete ui->browserHWAccel; delete ui->browserHWAccel;
delete ui->taskbarColor;
delete ui->sourcesGroup; delete ui->sourcesGroup;
#if defined(__APPLE__) || HAVE_PULSEAUDIO #if defined(__APPLE__) || HAVE_PULSEAUDIO
delete ui->disableAudioDucking; delete ui->disableAudioDucking;
...@@ -647,7 +643,6 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent) ...@@ -647,7 +643,6 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
ui->enableNewSocketLoop = nullptr; ui->enableNewSocketLoop = nullptr;
ui->enableLowLatencyMode = nullptr; ui->enableLowLatencyMode = nullptr;
ui->browserHWAccel = nullptr; ui->browserHWAccel = nullptr;
ui->taskbarColor = nullptr;
ui->sourcesGroup = nullptr; ui->sourcesGroup = nullptr;
#if defined(__APPLE__) || HAVE_PULSEAUDIO #if defined(__APPLE__) || HAVE_PULSEAUDIO
ui->disableAudioDucking = nullptr; ui->disableAudioDucking = nullptr;
...@@ -1203,11 +1198,7 @@ void OBSBasicSettings::LoadGeneralSettings() ...@@ -1203,11 +1198,7 @@ void OBSBasicSettings::LoadGeneralSettings()
bool systemTrayAlways = config_get_bool( bool systemTrayAlways = config_get_bool(
GetGlobalConfig(), "BasicWindow", "SysTrayMinimizeToTray"); GetGlobalConfig(), "BasicWindow", "SysTrayMinimizeToTray");
ui->systemTrayAlways->setChecked(systemTrayAlways); 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", bool saveProjectors = config_get_bool(GetGlobalConfig(), "BasicWindow",
"SaveProjectors"); "SaveProjectors");
ui->saveProjectors->setChecked(saveProjectors); ui->saveProjectors->setChecked(saveProjectors);
...@@ -3003,15 +2994,7 @@ void OBSBasicSettings::SaveGeneralSettings() ...@@ -3003,15 +2994,7 @@ void OBSBasicSettings::SaveGeneralSettings()
config_set_bool(GetGlobalConfig(), "BasicWindow", config_set_bool(GetGlobalConfig(), "BasicWindow",
"SysTrayMinimizeToTray", "SysTrayMinimizeToTray",
ui->systemTrayAlways->isChecked()); 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)) if (WidgetChanged(ui->saveProjectors))
config_set_bool(GetGlobalConfig(), "BasicWindow", config_set_bool(GetGlobalConfig(), "BasicWindow",
"SaveProjectors", "SaveProjectors",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册