Add tooltip to "verify timestamps" option

This commit is contained in:
WarmUpTill 2025-12-03 14:00:01 +01:00 committed by WarmUpTill
parent c602c30c54
commit 98cc710b4a
2 changed files with 9 additions and 1 deletions

View File

@ -1608,6 +1608,7 @@ AdvSceneSwitcher.twitchToken.user.whispers.manage="Manage user's whispers."
AdvSceneSwitcher.twitchToken.chat.read="View live stream chat messages."
AdvSceneSwitcher.twitchToken.chat.edit="Send live stream chat messages."
AdvSceneSwitcher.twitchToken.validateTimestamps="Validate timestamps of received Twitch event messages."
AdvSceneSwitcher.twitchToken.validateTimestamps.tooltip="Verifies that incoming Twitch messages have valid timestamps to prevent replayed or spoofed messages.\nDisabling this wont affect normal functionality, and you can try turning it off if you experience issues with the Twitch connection."
AdvSceneSwitcher.twitchToken.warnIfInvalid="Display warning if the token expired or is invalid."
AdvSceneSwitcher.twitchToken.warnIfInvalid.doNotShowAgain="Don't show again for this connection"
AdvSceneSwitcher.twitchToken.warnIfInvalid.message="The Twitch connection \"%1\" is invalid.\nOpen connection settings or ignore?"

View File

@ -1,6 +1,7 @@
#include "token.hpp"
#include "twitch-helpers.hpp"
#include <help-icon.hpp>
#include <layout-helpers.hpp>
#include <log-helper.hpp>
#include <obs-module-helper.hpp>
@ -547,11 +548,17 @@ TwitchTokenSettingsDialog::TwitchTokenSettingsDialog(
scrollArea->setWidgetResizable(true);
scrollArea->setFrameShape(QFrame::NoFrame);
auto timestampsLayout = new QHBoxLayout();
timestampsLayout->addWidget(_validateTimestamps);
auto timestampHelp = new HelpIcon(obs_module_text(
"AdvSceneSwitcher.twitchToken.validateTimestamps.tooltip"));
timestampsLayout->addWidget(timestampHelp);
auto contentWidget = new QWidget(scrollArea);
auto layout = new QVBoxLayout(contentWidget);
layout->addLayout(_generalSettingsGrid);
layout->addWidget(optionsBox);
layout->addWidget(_validateTimestamps);
layout->addLayout(timestampsLayout);
layout->addWidget(_warnIfInvalid);
layout->setContentsMargins(0, 0, 0, 0);
scrollArea->setWidget(contentWidget);