option to hide viewer count and duration of the stream when you hover on the split (#1626)

Fixes #1621
This commit is contained in:
apa420 2020-04-13 12:24:27 +02:00 committed by GitHub
parent 3138efba25
commit 2ac0b60952
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 2 deletions

View file

@ -278,6 +278,8 @@ public:
BoolSetting restartOnCrash = {"/misc/restartOnCrash", false}; BoolSetting restartOnCrash = {"/misc/restartOnCrash", false};
BoolSetting attachExtensionToAnyProcess = { BoolSetting attachExtensionToAnyProcess = {
"/misc/attachExtensionToAnyProcess", false}; "/misc/attachExtensionToAnyProcess", false};
BoolSetting hideViewerCountAndDuration = {
"/misc/hideViewerCountAndDuration", false};
/// Debug /// Debug
BoolSetting showUnhandledIrcMessages = {"/debug/showUnhandledIrcMessages", BoolSetting showUnhandledIrcMessages = {"/debug/showUnhandledIrcMessages",

View file

@ -540,6 +540,9 @@ void GeneralPage::initLayout(SettingsLayout &layout)
s.enableExperimentalIrc); s.enableExperimentalIrc);
layout.addCheckbox("Show unhandled IRC messages", layout.addCheckbox("Show unhandled IRC messages",
s.showUnhandledIrcMessages); s.showUnhandledIrcMessages);
layout.addCheckbox(
"Hide viewercount and stream length while hovering the split",
s.hideViewerCountAndDuration);
layout.addTitle("Cache"); layout.addTitle("Cache");
layout.addDescription( layout.addDescription(

View file

@ -94,8 +94,11 @@ namespace {
.arg(s.game.toHtmlEscaped()) .arg(s.game.toHtmlEscaped())
.arg(s.game.isEmpty() ? QString() : "<br>") .arg(s.game.isEmpty() ? QString() : "<br>")
.arg(s.rerun ? "Vod-casting" : "Live") .arg(s.rerun ? "Vod-casting" : "Live")
.arg(s.uptime) .arg(getSettings()->hideViewerCountAndDuration ? "&lt;Hidden&gt;"
.arg(QString::number(s.viewerCount)); : s.uptime)
.arg(getSettings()->hideViewerCountAndDuration
? "&lt;Hidden&gt;"
: QString::number(s.viewerCount));
} }
auto formatOfflineTooltip(const TwitchChannel::StreamStatus &s) auto formatOfflineTooltip(const TwitchChannel::StreamStatus &s)
{ {