Changed Streamer Mode settings (#2001)

There's now a new (yet another, sigh) section in Settings -> General, which lets you set streamer mode to 'enable/disable/detect obs' and there are also separate settings for each of the things that streamer mode covers. I just have to add ping sounds and PR is ready to be merged :)

* Show "Streamer Mode" image as link thumbnails if applicable

* Moved hideViewerCountAndDuration to streamerMode settings

Set it to false by default (just how it used to be under /misc settings, also reworked live tooltip to be a bit prettier and say "<Streamer Mode>" in gray instead of "Live with <hidden> for <hidden> viewers"
This commit is contained in:
Paweł
2020-10-11 13:52:14 +02:00
committed by GitHub
parent 56828f2d81
commit 2232c6d925
10 changed files with 164 additions and 66 deletions
+26 -3
View File
@@ -13,6 +13,7 @@
#include "util/FuzzyConvert.hpp"
#include "util/Helpers.hpp"
#include "util/IncognitoBrowser.hpp"
#include "util/StreamerMode.hpp"
#include "widgets/BaseWindow.hpp"
#include "widgets/dialogs/ColorPickerDialog.hpp"
#include "widgets/helper/ColorButton.hpp"
@@ -529,6 +530,31 @@ void GeneralPage::initLayout(SettingsLayout &layout)
return fuzzyToInt(args.value, 0);
});
layout.addTitle("Streamer Mode");
layout.addDescription(
"Chatterino can automatically change behavior if it "
"detects that \"OBS Studio\" is running.\nSelect which "
"things you want to change while streaming");
ComboBox *dankDropdown =
layout.addDropdown<std::underlying_type<StreamerModeSetting>::type>(
"Enable Streamer Mode", {"No", "Yes", "Detect OBS (Windows only)"},
s.enableStreamerMode, [](int value) { return value; },
[](DropdownArgs args) {
return static_cast<StreamerModeSetting>(args.index);
},
false);
dankDropdown->setMinimumWidth(dankDropdown->minimumSizeHint().width() + 10);
layout.addCheckbox("Hide usercard avatars",
s.streamerModeHideUsercardAvatars);
layout.addCheckbox("Hide link thumbnails",
s.streamerModeHideLinkThumbnails);
layout.addCheckbox(
"Hide viewer count and stream length while hovering over split header",
s.streamerModeHideViewerCountAndDuration);
layout.addCheckbox("Mute mention sounds", s.streamerModeMuteMentions);
layout.addTitle("Emotes");
layout.addCheckbox("Enable", s.enableEmoteImages);
layout.addCheckbox("Animate", s.animateEmotes);
@@ -732,9 +758,6 @@ void GeneralPage::initLayout(SettingsLayout &layout)
s.enableExperimentalIrc);
layout.addCheckbox("Show unhandled IRC messages",
s.showUnhandledIrcMessages);
layout.addCheckbox(
"Hide viewercount and stream length while hovering the split",
s.hideViewerCountAndDuration);
layout.addDropdown<int>(
"Stack timeouts", {"Stack", "Stack until timeout", "Don't stack"},
s.timeoutStackStyle, [](int index) { return index; },