From bbad7f3e1f04f5dd42e5f805b8e0246088072c88 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sat, 21 Aug 2021 06:49:34 -0700 Subject: [PATCH] UI: Replace bad YouTube link with popup helper The helper link associated with starting a scheduled broadcast was not helpful, as it linked to developer API documentation. Instead, have the helper widget pop up a tooltip so the user understands what it is doing, and adjust the wording slightly so that the user knows it's a setting primarily used for scheduled broadcasts (normal streams always start right away) --- UI/data/locale/en-US.ini | 2 +- UI/forms/OBSYoutubeActions.ui | 4 ++-- UI/window-youtube-actions.cpp | 7 ++++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/UI/data/locale/en-US.ini b/UI/data/locale/en-US.ini index ed1a299fa..901614b69 100644 --- a/UI/data/locale/en-US.ini +++ b/UI/data/locale/en-US.ini @@ -1208,7 +1208,7 @@ YouTube.Actions.Latency.Low="Low" YouTube.Actions.Latency.UltraLow="Ultra low" YouTube.Actions.EnableAutoStart="Enable Auto-start" YouTube.Actions.EnableAutoStop="Enable Auto-stop" -YouTube.Actions.AutoStartStop.Help="(?)" +YouTube.Actions.AutoStartStop.TT="Indicates whether this scheduled broadcast should start automatically" YouTube.Actions.EnableDVR="Enable DVR" YouTube.Actions.360Video="360 video" YouTube.Actions.360Video.Help="(?)" diff --git a/UI/forms/OBSYoutubeActions.ui b/UI/forms/OBSYoutubeActions.ui index eb5613225..8473a57c4 100644 --- a/UI/forms/OBSYoutubeActions.ui +++ b/UI/forms/OBSYoutubeActions.ui @@ -262,7 +262,7 @@ - YouTube.Actions.AutoStartStop.Help + <a href=".">(?)</a> Qt::RichText @@ -474,7 +474,7 @@ 0 0 - 179 + 522 192 diff --git a/UI/window-youtube-actions.cpp b/UI/window-youtube-actions.cpp index eda0a25d8..1d52d4b31 100644 --- a/UI/window-youtube-actions.cpp +++ b/UI/window-youtube-actions.cpp @@ -5,6 +5,7 @@ #include "qt-wrappers.hpp" #include "youtube-api-wrappers.hpp" +#include #include #include @@ -56,7 +57,11 @@ OBSYoutubeActions::OBSYoutubeActions(QWidget *parent, Auth *auth) &OBSYoutubeActions::OpenYouTubeDashboard); connect(ui->helpAutoStartStop, &QLabel::linkActivated, this, - [](const QString &link) { QDesktopServices::openUrl(link); }); + [](const QString &) { + QToolTip::showText( + QCursor::pos(), + QTStr("YouTube.Actions.AutoStartStop.TT")); + }); connect(ui->help360Video, &QLabel::linkActivated, this, [](const QString &link) { QDesktopServices::openUrl(link); }); connect(ui->helpMadeForKids, &QLabel::linkActivated, this,